Open kennyweiss opened 5 months ago
Note: This bugfix seems related to the discussion in https://github.com/mathandy/svgpathtools/pull/98 (specifically, this comment from @Vrroom -- https://github.com/mathandy/svgpathtools/pull/98#issuecomment-841042615)
Thanks for this great library!
I was playing with rotated ellipses and noticed a bug in how the rotation angle is extracted from the transform function. Essentially,
arccos
wasn't computing the right sign for some angles, so I replaced it witharctan2
and added a bunch of unit tests.Reproducer:
Before this PR, the following input
generated these arc paths:
Note: The angle is 45 degrees instead of -45 degrees, which is rendered as: (note: I changed the fill color for easier comparison).
After this PR, the correct arc paths are produced: