RoboFab RSegment
Usage
Description
A Contour object is a list of segments. A segment is a list of points with some special attributes and methods. See the LettError wiki for a comprehensive explanation of segments.
Understanding Contours and outlines
The way outline data is organised in RoboFab, and how the various objects relate is described here: understanding contours.
Attributes
- type: Type of segment
- smooth: True if the segment is smooth, False if not.
- selected: Returns True if the segment is selected, False if not.
- points: List of points in the segment.
- onCurve: Returns the oncurve point associated with the segment.
- offCurve: Returns a list of offcurve points associated with the segment.
Attribute examples
Methods
- copy(): return a deepcopy of the object.
- move((x, y)): move the anchor of the bPoint to (x,y). The relative coordinates of the bcpIn and bcpOut will remain the same, which means that in fact, they move the same distance.
- round(): round the coordinates to whole integers.
- transform(matrix): Transform this point. Use a Transform matrix object to mess with the point. See how to use transformations.