[filterPen] Add current_pt

This commit is contained in:
Behdad Esfahbod 2023-02-17 11:36:05 -07:00
parent 64bce6fc9b
commit e18fca76ef

View File

@ -56,24 +56,31 @@ class FilterPen(_PassThruComponentsMixin, AbstractPen):
def __init__(self, outPen):
self._outPen = outPen
self.current_pt = None
def moveTo(self, pt):
self._outPen.moveTo(pt)
self.current_pt = pt
def lineTo(self, pt):
self._outPen.lineTo(pt)
self.current_pt = pt
def curveTo(self, *points):
self._outPen.curveTo(*points)
self.current_pt = points[-1]
def qCurveTo(self, *points):
self._outPen.qCurveTo(*points)
self.current_pt = points[-1]
def closePath(self):
self._outPen.closePath()
self.current_pt = None
def endPath(self):
self._outPen.endPath()
self.current_pt = None
class ContourFilterPen(_PassThruComponentsMixin, RecordingPen):