Hi:
I use this function to revert the transform to the initial state of the svg
tree

canvas.resetRenderingTransform();

what i like to do is to be able to keep only the rotation transform, and
revert the "zoom" and "translate" back to the initial state.

I beleive this could be done by getting the rotation angle before this
method is called, and applying it after the call as follows:

    //get rotation angle "theta" here

    canvas.resetRenderingTransform();

    AffineTransform at = new AffineTransform();
    at.rotate(theta, canvas.getWidth()/2,canvas.getHeight()/2);
    at.concatenate(canvas.getRenderingTransform());//i am not usre if this
is necessary in this case but i put it anyway!
    canvas.setRenderingTransform(at);

I don't seem to be able to calculate the theta right.
can someone please tell me how to get theta?
and if you see something wrong in what i am doing above, please point it
out.
many thanks
hilz




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to