Apply a fix by Jan Thor to bug 714717, whereby Scour wrongly optimises away "0-length" Bézier curves if they have non-zero control points that actually create a curve.
This commit is contained in:
parent
6dc2553bed
commit
da3c9f1d98
1 changed files with 2 additions and 2 deletions
4
scour.py
4
scour.py
|
|
@ -1680,7 +1680,7 @@ def cleanPath(element, options) :
|
||||||
i += 2
|
i += 2
|
||||||
elif cmd == 'c':
|
elif cmd == 'c':
|
||||||
while i < len(data):
|
while i < len(data):
|
||||||
if data[i+4] == data[i+5] == 0:
|
if data[i] == data[i+1] == data[i+2] == data[i+3] == data[i+4] == data[i+5] == 0:
|
||||||
del data[i:i+6]
|
del data[i:i+6]
|
||||||
numPathSegmentsReduced += 1
|
numPathSegmentsReduced += 1
|
||||||
else:
|
else:
|
||||||
|
|
@ -1694,7 +1694,7 @@ def cleanPath(element, options) :
|
||||||
i += 7
|
i += 7
|
||||||
elif cmd == 'q':
|
elif cmd == 'q':
|
||||||
while i < len(data):
|
while i < len(data):
|
||||||
if data[i+2] == data[i+3] == 0:
|
if data[i] == data[i+1] == data[i+2] == data[i+3] == 0:
|
||||||
del data[i:i+4]
|
del data[i:i+4]
|
||||||
numPathSegmentsReduced += 1
|
numPathSegmentsReduced += 1
|
||||||
else:
|
else:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue