SVG transformation matrix to skia

Dear all,

I want to read a SVG and reconstruct the individual elements in Skia.
From the SVG I get a transformation matrix.
<text transform="matrix(0.9962 -8.715465e-02 8.715465e-02 0.9962 412.9485 651.8771)" font-family="'UniversLTStd'" font-size="380px">A</text>

I can transfer position and size without any problems, but I fail in translation of rotation.
The matrix is constructed as follows:
matrix(scaleX shearX shearY scaleY translateX translateY)

Via Atan2 I can calculate a radian from shearX shearY.
However, there is an offset depending on the rotation direction, which I can’t understand yet.
I hope someone can help me.

thanks + best

You can transfer these values directly into a 4x4 matrix, use the matrix join node with the 16 inputs for that.

Most likely like that:

scaleX, shearX, 0, 0,
shearY, scaleY, 0, 0,
0, 0, 1, 0,
translateX, translateY, 0, 1
1 Like

that’s it!
thank you @tonfilm

❤ ❤ ❤ ❤