path.transform: Arc sweep is reversed by negative scale
When transforming an Arc, negative scale reverses the sweep.pull/201/head
parent
6abda09d1c
commit
e94483510e
|
@ -338,9 +338,13 @@ def transform(curve, tf):
|
||||||
|
|
||||||
if new_radius.real == 0 or new_radius.imag == 0 :
|
if new_radius.real == 0 or new_radius.imag == 0 :
|
||||||
return Line(new_start, new_end)
|
return Line(new_start, new_end)
|
||||||
else :
|
else:
|
||||||
|
if tf[0][0] * tf[1][1] >= 0.0:
|
||||||
|
new_sweep = curve.sweep
|
||||||
|
else:
|
||||||
|
new_sweep = not curve.sweep
|
||||||
return Arc(new_start, radius=new_radius, rotation=curve.rotation + rot,
|
return Arc(new_start, radius=new_radius, rotation=curve.rotation + rot,
|
||||||
large_arc=curve.large_arc, sweep=curve.sweep, end=new_end,
|
large_arc=curve.large_arc, sweep=new_sweep, end=new_end,
|
||||||
autoscale_radius=True)
|
autoscale_radius=True)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue