I have an svg path element that is flipped and when I insert it into the document I have to transform it using transform="matrix(1 0 0 -1 0 0)"
. When this statement is executed, does the SVG Path element's data commands get transformed? Can I successfully get the new data commands, if it creates one, after the transformation? Or like I assume, the path element's data command remain the same.
Asked
Active
Viewed 319 times
0

k.ken
- 4,973
- 5
- 23
- 21
-
I'm not sure what you mean by the path "data command", perhaps the 'd' attribute? In that case yes, if you query `path.getAttribute('d')` then you will get the same result as in an untransformed element. – methodofaction Jul 03 '13 at 18:39
-
yeah the d attribute. I basically would like to get the updated version after translation or scale, or rotation etc. – k.ken Jul 03 '13 at 18:43
-
You will have to apply the transformation to the path, there are various related questions in the "related questions" sidebar. – methodofaction Jul 03 '13 at 19:43
-
I applied the transformations but the transformation doesn't change the d attribute of the path. Not sure if it's possible yet – k.ken Jul 03 '13 at 19:59
-
1Yes, it does not change the d attribute. You need to use a library or code it yourself, as is detailed in related answers: http://stackoverflow.com/questions/5149301/baking-transforms-into-svg-path-element-commands?rq=1 – methodofaction Jul 03 '13 at 21:00
1 Answers
1
you can use this little online tool: http://treebuilder.de/svg/transformer/index.html for a quick result.

Holger Will
- 7,228
- 1
- 31
- 39