Hi Thomas, I believe that the window -> viewBox code gives nearly the same results. For some reason, the target document is always anchored at the upper left of the document. It seems to be overriding or ignoring translation. I have a "background" rectangle set on my example SVG, so I can see where the document is versus the canvas. The reason I don't expect negative results is that I always use the zoom interactor on the document itself, not only the canvas. But that's odd, the logging calls are made after the rendering transform has been set, so one would assume it would reflect the new scaling. It certainly does on the screen. I'll try attaching the code again to this message. Maybe it's just too big after merging all the functionality into a single class file. I also posted it to http://www.mindspring.com/~bishopmw/DemoCanvas.java Michael
________________________________ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wed 10/15/2008 6:29 AM To: [email protected] Subject: RE: Tracking changes to the rendering transform? Hi Michael, "Bishop, Michael W. CONTR J9C880" <[EMAIL PROTECTED]> wrote on 10/14/2008 03:40:05 PM: > Similar results; it seems the first row is correct and the second > row has numbers out of order. Visually, the result is better, the > closer I have the zoom interactor to the top-left of the screen. If > I drag a box near the top left of the source canvas, it's close. > The further I get from the top-left, the more wrong it is. It seems > translation doesn't get applied properly, the target canvas is > always anchored to the upper-left of the document, regardless of the > source canvas's view. The scaling is usually close. So does your window -> viewBox mapping code give the same results on the destination canvas as it did on the source canvas after you have set the renderingTransform? My guess is not which means that the rendering transform wasn't properly calculated some how. BTW given that your canvas is 200x200 and the document is 640x480 it is expected that window 0,0 could map to a negative Y value (480*200/640 give a scaled height of only 150 for the document which means that there will be 25 pixels on the top and bottom which are 'outside' of the document viewBox). > Target Screen CTM: [ 0.312 0 0 0.312 0 0.125 ] > Target view box transform: AffineTransform[[0.3125, 0.0, 0.0], [0.0, 0.3125, > 0.125]] These transforms look a lot like the default scaling transform 200/640 = .3125 So I'm surprised that they are your source canvas's transform after using the zoom interactor. BTW your code never made it as an attachment.
<<winmail.dat>>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
