Open abey79 opened 4 years ago
This simple test case is fixed by the following modification:
--- a/svgpathtools/path.py
+++ b/svgpathtools/path.py
@@ -288,7 +288,7 @@ def transform(curve, tf):
elif isinstance(curve, Arc):
new_start = to_complex(tf.dot(to_point(curve.start)))
new_end = to_complex(tf.dot(to_point(curve.end)))
- new_radius = to_complex(tf.dot(to_vector(curve.radius)))
+ new_radius = curve.radius
if tf[0][0] * tf[1][1] >= 0.0:
new_sweep = curve.sweep
else:
However, I am unsure if this induces other regressions.
Setup
python 3.8.6 svgpathtools master (45dc873f82fba28ae905eb4262446cc54908a8a8)
Expected
Arc with rotation transform are interpreted correctly:
E.g.:
Full test file: arc_with_rotate.svg.zip
Displayed by macOS:
Actual
Arcs with a rotation transform (the ones on the right in this example) are deformed when loaded with svgpathtools.