Hi !
I'm new on this list, trying to play with batik since a few months now.
What's a powerful tool ...
Well, i'm working on an application wich need to rotate a JSVGCanvas
(90°, 180°, 270°). I used AffineTransform and the method
setRenderingTransform like that :
public void setSVGAffineTransformation(){
double CT=
zoomControl.getTableauZoomCombo()[zoomControl.getZoomComboBoxValue()];
AffineTransform tx = new AffineTransform();
tx.setToScale(CT,CT);
if(zoomControl.getAngleRotation() != 0){
double sinA = Math.sin(zoomControl.getAngleRotation());
tx.rotate(zoomControl.getAngleRotation(),
Main.getFenetrePrincipale().getFenetreManuscrit().getPaintCanvas().getImage().getWidth(null)
/ 2,
Main.getFenetrePrincipale().getFenetreManuscrit().getPaintCanvas().getImage().getHeight(null)
/ 2);
//tx.translate(sinA *
Main.getFenetrePrincipale().getFenetreManuscrit().getPaintCanvas().getRect().getX()/CT,
-sinA *
Main.getFenetrePrincipale().getFenetreManuscrit().getPaintCanvas().getRect().getY()/CT);
}
svgCanvas.setRenderingTransform(tx);
}
I'm trying to rotate, then translate the canvas to correct the rotation
error, but it doesn't work as week as i want.
So my question is :
How to rotate a Canvas for having :
- bottom left corner at 0,0 with 90° rotate
- bottom right corner at 0,0 with 180° rotate
- up right corner at 0,0 with 270° rotate
Best regards, and sorry for my english !
Thomas
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]