[qu2cu_pen] Respect all_cubic for oncurveless curves
This commit is contained in:
parent
336cfc3e8f
commit
efed2550be
@ -63,11 +63,13 @@ class Qu2CuPen(ContourFilterPen):
|
|||||||
currentPt = None
|
currentPt = None
|
||||||
newContour = []
|
newContour = []
|
||||||
for op, args in contour:
|
for op, args in contour:
|
||||||
if (
|
if op == "qCurveTo" and (
|
||||||
op == "qCurveTo"
|
self.all_cubic or (len(args) > 2 and args[-1] is not None)
|
||||||
and (self.all_cubic or len(args) > 2)
|
|
||||||
and args[-1] is not None
|
|
||||||
):
|
):
|
||||||
|
if args[-1] is None:
|
||||||
|
raise NotImplementedError(
|
||||||
|
"oncurve-less contours with all_cubic not implemented"
|
||||||
|
)
|
||||||
quadratics.append((currentPt,) + args)
|
quadratics.append((currentPt,) + args)
|
||||||
else:
|
else:
|
||||||
if quadratics:
|
if quadratics:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user