xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m.@mherrn.de
Subject Re: Set a zooming-strategy to an SVGCanvas
Date Fri, 11 May 2012 08:31:33 GMT

>> The example application and SVG file are attached to this mail.
> 	I didn't see them show up as attachments.

Damn. I forgot the attachments....
Included in this mail now. :-)

>> When the application starts, the image is always displayed as expected.
>> But when extending the width of the window, the image starts beginning
>> to
>> move out of the canvas on the top. Addionally when lowering the width of
>> the window, the image starts to move down inside the canvas (not staying
>> in the top left corner).
> 	Do you have 'recenterOnResize' enabled?  That might react badly to your
> reimplementation of calculateViewingTransform.

Yes, recenterOnResize was enabled. But if I set recenterOnResize=false,
nothing gets scaled at all! (And I don't know why. It seems I really have
to view through some implementation details in JSVGCanvas.)

>>  2. What am I doing wrong here (or where is my misunderstanding)?
> 	It is very easy to make small mistakes in the calculation of
> AffineTransforms
> that can lead to effects like this.  Resize is especially tricky because
> it requires a
> trip through the SVG Document event handlers and it's complex to get the
> viewing
> transform and the display transform to behave sensibly.

Actually, I thought what I am doing would't be that tricky, because my
current implementation is far from complex. Well, it is now attached.
Maybe you see my mistake. :-)

View raw message