inkscape-applytransforms icon indicating copy to clipboard operation
inkscape-applytransforms copied to clipboard

scaleStrokeWidth calculation not completely correct

Open burghoff opened this issue 2 years ago • 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.

burghoff avatar Nov 23 '21 13:11 burghoff