RoboFab Point
Usage
Description
RPoint is perhaps the smallest object in RoboFab objects. It represents one single point with a particular coordinate in a contour. It is used to access off-curve and on-curve points alike. It's cousin, bPoint also provides access to incoming and outgoing bcps. RPoint is exclusively only one single point.
Understanding Contours and outlines
The way outline data is organised in RoboFab, and how the various objects relate is described here: understanding contours.
Attributes
- x: the x coordinate of this point.
- y: the y coordinate of this point.
- type: the type of this point.
- selected: boolean for selection state. i.e. "True" or "False"
UFO only attributes
- name: the name of the point (UFO only)
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.
- select(state=True): select this point.
- transform(matrix): Transform this point. Use a Transform matrix object to mess with the point. See how to use transformations.