I have a simple problem: I want to extract translation (tx, ty), rotation (r) and scale (sx, sy) values form a transform matrix applied to my svg element.
Let's use this example:
<g
id="myElement"
transform="matrix(0.93893241,0.34410162,-0.34410162,0.93893241,363.88475,-76.125919)"
>... </g>
If, in javascript I do
document.getElementById("myElement").getCTM()
I can access to a, b, c, d, e, f values. How can I get tx, ty, sx, sy and r from there?
Thanks
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…