|
Hello,
I'm still struggling with this issue, so I would
like some suggestions on how to approach it.
I have a JSVGCanvas in an applet. That canvas holds
an overlay that paints Java2D shapes. Everytime a rendering transform is applied
to the canvas, I have my overlay apply the same transform to all Java2D shapes,
so they all keep the same relative position, regardless of the
zooming/panning/rotation.
Now, my problem is that, when the JSVGCanvas
gets resized, the document is transformed to fit in the entire new
area. This means that, if the canvas' size is reduced, the document is
scaled down, and so on. This is the default Batik behavior.
I would like to use the same approach I described
above to keep my overlay's shapes in synch with the canvas when it is
resized. However, I was not able to determine which AffineTransform is applied
to the canvas.
I got to a very close effect by messing
with the viewBox transform, but the synch is not perfect (the shapes always get
a little displaced) and the amount of code for doing that is really
disturbing. If I could just grab the AffineTransform applied to the canvas in a
resize operation, that could be accomplished with 2 lines of code.
Any ideas will be most
welcome.
|
- JSVGCanvas resizing transform André Ávila
- Re: JSVGCanvas resizing transform thomas . deweese
- Re: JSVGCanvas resizing transform André Ávila
- Re: JSVGCanvas resizing transform thomas . deweese
