[qu2cuPen] Don't add implicit points for cubics
We can't since that would be interpretted as a superBezier.
This commit is contained in:
parent
86aff322b9
commit
84cd10d666
@ -78,12 +78,14 @@ class Qu2CuPen(ContourFilterPen):
|
||||
contour = newContour
|
||||
newContour = []
|
||||
for op, args in contour:
|
||||
if (op in {"curveTo", "qCurveTo"} and newContour and newContour[-1][0] == op):
|
||||
if op == "qCurveTo" and newContour and newContour[-1][0] == "qCurveTo":
|
||||
pt0 = newContour[-1][1][-2]
|
||||
pt1 = newContour[-1][1][-1]
|
||||
pt2 = args[0]
|
||||
if (pt2[0] - pt1[0] == pt1[0] - pt0[0] and
|
||||
pt2[1] - pt1[1] == pt1[1] - pt0[1]):
|
||||
if (
|
||||
pt2[0] - pt1[0] == pt1[0] - pt0[0]
|
||||
and pt2[1] - pt1[1] == pt1[1] - pt0[1]
|
||||
):
|
||||
newArgs = newContour[-1][1][:-1] + args
|
||||
newContour[-1] = (op, newArgs)
|
||||
continue
|
||||
|
Loading…
x
Reference in New Issue
Block a user