Bishop, Michael W. CONTR J9C880 wrote:
Yeah, I'm learning more about transforms than I really want to. Oh well,
it helps. Unfortunately, applying a rotate to a transform seems to really
screw up scaling AND translating. Looking at the matrix, it makes sense as to
why. If I draw an element to the JSVGCanvas, and want to be able to move,
scale, and rotate it without one operation hosing up another, how do I achieve
this? I had scaling and translating down pat, but rotation breaks everything.
Rotation is always around some point. If you want the icon or whatever
to always rotate around its center point, then you have to remember
where that is. Then you can always temporarily translate back to (0,0)
before (un)doing any rotation and/or scaling.
E.g., add some attributes to the node (using a different namespace)
to maintain this information...
<g xmlns:foo="http://www.foo.com/myns"
tranform="..." foo:center="123.4 567.8">
-Archie
__________________________________________________________________________
Archie Cobbs * CTO, Awarix * http://www.awarix.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]