Skip to content

fontlab_glyport.model.pens.LayerPen

LayerPen

A writing pen supporting both Glyphs point and segment protocols.

A contour is staged until endPath/closePath, then appended through the layer's existing collection route. Components append through that route too.

Complete member index

Every captured member retains its own identity. Identical captured declaration text is linked once; this does not establish native inheritance or interchangeable objects.

Member Kind Signature Summary
__del__ function (self)
__enter__ function (self) Retain one history scope for all contours/components in this session.
__exit__ function (self, *exc)
__init__ function (self, layer)
addComponent function (self, glyphName, transformation, identifier=None, **kwargs) Append an affine component using the existing backend contract.
addPoint function (self, pt, segmentType=None, smooth=False, name=None, identifier=None, **kwargs) Append a point, preserving quadratic/cubic type and smoothness.
beginPath function (self, identifier=None, **kwargs) Begin a staged contour; identifiers have no native counterpart.
close function (self) Explicitly finish the drawing session, like doneDrawing().
closePath function (self) Finish and append a closed segment contour.
curveTo function (self, *points) Append cubic control points and endpoint.
doneDrawing function (self) Finish this pen's history step; repeated calls are harmless.
endPath function (self) Finish a point contour, or the active open segment contour.
lineTo function (self, pt) Append a straight segment.
moveTo function (self, pt) Begin a segment contour.
qCurveTo function (self, *points) Append quadratic controls, including implied closing points.