pointPen¶
PointPens¶
Where SegmentPens have an intuitive approach to drawing (if you’re familiar with postscript anyway), the PointPen is geared towards accessing all the data in the contours of the glyph. A PointsPen has a very simple interface, it just steps through all the points in a call from glyph.drawPoints(). This allows the caller to provide more data for each point. For instance, whether or not a point is smooth, and its name.
-
class
ufoLib.pointPen.
AbstractPointPen
[source]¶ Baseclass for all PointPens.
-
class
ufoLib.pointPen.
BasePointToSegmentPen
[source]¶ Base class for retrieving the outline in a segment-oriented way. The PointPen protocol is simple yet also a little tricky, so when you need an outline presented as segments but you have as points, do use this base implementation as it properly takes care of all the edge cases.
-
addComponent
(baseGlyphName, transformation, identifier=None, **kwargs)¶ Add a sub glyph.
-