Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Transform origin SVG image rotation

I'm having difficulty rotating an image right now since I can't set the transform origin. I'm not quite sure how you get this to work?

 

SVG doesn't seem to like this:

transform="rotate(45, 168, 168)"

---------------------------

Error 22 Invalid rotate value '45, 168, 168'

 

Going by this explanation, it should work

rotate(angle | angle, cx, cy): specifies a rotation by angle degrees about a given poin cx, cy. If the optional coordinate parameters are not supplied, the rotation is about the origin of the element.

Best Answer
3 REPLIES 3

It may be the origin is calculated somewhere else or it only works for certain items or has to be defined in a certain way.

Couldn't find the method to make it work consistently for all items in SDK 6 either.

Author | ch, passion for improvement.

Best Answer

Try including a translate in your transform.

Peter McLennan
Gondwana Software
Best Answer
0 Votes

I've tried including a transform translate but that only seems to translate the image and not the origin point once I try to rotate it. It's just weird how the SVG documentation mentions you can change the transform origin but yet it doesn't work in code

Best Answer
0 Votes