hilz wrote:

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

canvas.resetRenderingTransform();

All this does, for the JSVGCanvas, is setRenderingTransform to the identity transform. So you can skip this entirely and just set the rendering transform to what you want.

I don't seem to be able to calculate the theta right.
can someone please tell me how to get theta?

This isn't well defined, in the general case. If you can assume a uniform scale in X&Y you can simply scale by the squareroot of the determinant of the affinetransform, and set the translate portion to 0 to get just the 'rotation' portion of the matrix. If you really want theta then read the description of getRotateInstance and do the trig ;)

and if you see something wrong in what i am doing above, please point it out.

In the general case you can't do what you want. But if you only have uniform scale and translates then you should be ok.


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



Reply via email to