RecordingPointPen: handle identifier args

This commit is contained in:
Nikolaus Waxweiler 2021-02-28 11:37:13 +00:00 committed by Nikolaus Waxweiler
parent cf8deef420
commit bc2bbe6a98

View File

@ -122,16 +122,22 @@ class RecordingPointPen(AbstractPointPen):
def __init__(self):
self.value = []
def beginPath(self, **kwargs):
def beginPath(self, identifier=None, **kwargs):
if identifier is not None:
kwargs["identifier"] = identifier
self.value.append(("beginPath", (), kwargs))
def endPath(self):
self.value.append(("endPath", (), {}))
def addPoint(self, pt, segmentType=None, smooth=False, name=None, **kwargs):
def addPoint(self, pt, segmentType=None, smooth=False, name=None, identifier=None, **kwargs):
if identifier is not None:
kwargs["identifier"] = identifier
self.value.append(("addPoint", (pt, segmentType, smooth, name), kwargs))
def addComponent(self, baseGlyphName, transformation, **kwargs):
def addComponent(self, baseGlyphName, transformation, identifier=None, **kwargs):
if identifier is not None:
kwargs["identifier"] = identifier
self.value.append(("addComponent", (baseGlyphName, transformation), kwargs))
def replay(self, pointPen):