
On January 9, 2011 at 2:21 PM Bryan Hoyt | Brush Technology <bryan@...2542.....> wrote:
Hi Bric,
Yes, you're correct. The x/y values are being translated, scaled, rotated, and/or sheared by the transform matrix. These pages on Wikipedia should help you to get started: http://en.wikipedia.org/wiki/Transformation_(geometry) and http://en.wikipedia.org/wiki/Transformation_matrix
Yes, I am using the (cos, sin, -sin, cos) rotation matrix in my script, and inkscape seems to visualize my rotation angle the way i intend. But, as is the issue, not the x/y position of my intent. OK. Thanks for this info. At this point I can only vaguely understand how (and why) inkscape would store transformed values in the SVG file, instead of storing the original coordinates and then subjecting those to whatever transformation the applies, during render time. I'll have to get back to this later.
Also, it's not just the transform matrix on the object itself that you need
to think about. If the text object is part of a group or a layer, then if there's a transform matrix on any of its parent groups or layers, they'll affect the object cumulatively.
thanks.
I've written Python code to handle all these scenarios in the Pixelsnap
extension. Have a look at the code for that if you want.
I skimmed through your code, and see that you are computing offsets based on transformation. Still, it looks complex for me right now; will have to return to it later when I have more time. I can't wrap my mind around how exactly to apply the transformation to the x y position. I'll tinker with this later. thanks again