Klowner/inkscape-applytransforms

scaleStrokeWidth calculation not completely correct

Closed this issue · 0 comments

As it currently stands, a line tilted at 45 degrees will get a different width than a vertical or horizontal line. In order to properly handle rotations, line 49 should actually be
stroke_width *= math.sqrt(abs(transf.a * transf.d - transf.b * transf.c))
This is because the width of something is better defined in terms of the transform's determinant. The above version is rotation-invariant.

Thanks for making this—I incorporated a version into my own extensions.