Unfortunately I have run into another problem. I have now read up on the SVG transform spec etc, so i have a clearer idea of what the transform matrix is. Nevertheless, I am now trying to render a more complex vector shape (star) and am running into problems.
The matrices for the simple rectangular elements (which have text placed into them) are very similar to this:
matrixForElement
: QMatrix(11=1 12=0 21=0 22=1 dx
=-20.4364 dy
=-382.362)
matrixForElement: QMatrix(11=1 12=0 21=0 22=1 dx=-20.4364 dy=-382.362)
To copy to clipboard, switch view to plain text mode
however, the matrix for the star element (which is right below the text rect, hence should have similar dx/dy values, is:
matrixForElement
: QMatrix(11=0.193355 12=0 21=0 22=0.201225 dx
=250.899 dy
=104.113)
matrixForElement: QMatrix(11=0.193355 12=0 21=0 22=0.201225 dx=250.899 dy=104.113)
To copy to clipboard, switch view to plain text mode
this of course means that if i do a translate( dx, dy) on the bounding rect, the text boxes will line up correctly, as foreseen, but the stars will go *the other way* and get even farther away. do you know if this is a problem with the svg, or am i doing some sort of rendering error?
note: if i do *not* add the translation to anything, both the stars and the text all are aligned correctly relative to each other, but are all position too far down, as in the original screenshot.
Bookmarks