I need to be more precise:
Here is the method I call (which is supposed to
1) keep the current Affine transform applied to the canvas
2) load the "document" to the canvas (it's the same document that was
displayed before: the only changes are some svg groupments which are hidden
in this new version of the document. That's why i would like to keep the
former affine transform applied).
3) apply the Affine transform.
public void actionPerformed(ActionEvent arg0) {
modification();
AffineTransform at =
Main.fenetre.getCanvas().getRenderingTransform();
Main.fenetre.mAJCanvas(); //equivalent to a
setSVGDocument(document). mAJCanvas() is defined previously.
Main.fenetre.getCanvas().setRenderingTransform(at);
}
Moreover, when i try to print the Affine Transforms (as it is done in the
following method), the former affine transform is applied, but only for a
few seconds. The SVGCanvas returns to an Identyty renderingTransform.
public void actionPerformed(ActionEvent arg0) {
modification();
AffineTransform at =
Main.fenetre.getCanvas().getRenderingTransform();
System.out.println(at);
Main.fenetre.mAJCanvas();
Main.fenetre.getCanvas().setRenderingTransform(at);
AffineTransform test =
Main.fenetre.getCanvas().getRenderingTransform();
System.out.println(test);
}
Can you help me please?
Thanks
--
Mathieu
2009/6/16 Mathieu Pedrero <[email protected]>
> Hi
>
> I would like to apply an affine transform to my jsvg canvas. Unfortunately,
> when I try to use the method setRenderingTransform(newAffineTransform) of my
> canvas, the newAffineTransform is no applied!
>
> Can you help me please?
>
> Thanks!
>
> --
> Mathieu
>