# robofab manual # bPoint object # Usage examples g = CurrentGlyph() for aPt in g.bPoints: print aPt
< RbPoint for Special-Bold.A >
bPoint is a point object which mimics the old “Bezier Point” from RoboFog. It has attributes for
type. The coordinates in
bcpOut are relative to the position of the anchor. For instance, if the
bcpIn is 20 units to the left of the anchor, its coordinates would be
(-20,0), regardless of the coordinates of the anchor itself. Also:
bcpIn will be
(0,0) when it is “on top of the anchor”, i.e. when there is no
bcp it will still have a value. The parent of a
bPoint is usually a Contour.
Understanding Contours and outlines¶
The way outline data is organised in RoboFab, and how the various objects relate is described here: understanding contours
(x, y) position of (oncurve) anchor.
(x, y) position of the incoming (offcurve) bezier control point.
(x, y) position of the outgoing (offcurve) bezier control point.
The type of the
# robofab manual # bPoint object # Attribute examples g = CurrentGlyph() for aPt in g.bPoints: print aPt.bcpIn, aPt.bcpOut, aPt.anchor
(0, -175) (611, 337) (0, 175) (0, 0) (223, 641) (0, 0) etc..
Return a deepcopy of the object.
Move the anchor of the
(x,y). The relative coordinates of the
bcpOut will remain the same, which means that in fact, they move the same distance.
Round the coordinates to whole integers.
Select this point.
Transform this point. Use a Transform matrix object to mess with the point.
>>> # robofab manual >>> # bPoint object >>> # method examples