fontlab.flShapeInfo · declarations 001
appendComposite
appendComposite(arg0: flShapeInfo) -> Any
appendComposite(flShapeInfo)
Appends a composite child to the end of the composite chain.
Source: FontLab Proteus API documentation
boundingBox
boundingBox() -> QRectF
QRectF boundingBox()
Returns the bounding rectangle of the shape in glyph units (not screen). Use brectOnCanvas() for screen pixels.
Source: FontLab Proteus API documentation
brectOnCanvas
brectOnCanvas() -> QRectF
QRectF brectOnCanvas()
Returns the bounding rectangle of the shape in canvas (screen) coordinates at the current zoom. Use this to draw overlays at the right position.
Source: FontLab Proteus API documentation
composites
instance-attribute
composites: Any
QList
The ordered list of child composite shapes. Setting this replaces the entire composite list.
Source: FontLab Proteus API documentation
compositesTransform
compositesTransform() -> QTransform
QTransform compositesTransform()
Returns the accumulated transform from compositing. Shapes can be placed inside composites which apply additional transformations; this method returns the product of all those transforms.
Source: FontLab Proteus API documentation
contains
contains(s: Any = ...) -> bool
bool contains(QPointF canvas_pos[, double s=1])
Returns True if the canvas point hits this shape's filled area. s is a scale factor for the hit-test tolerance — useful at high zoom where you want a smaller tolerance.
Source: FontLab Proteus API documentation
createInstance
createInstance() -> flShapeInfo
flShapeInfo createInstance()
Factory method. Creates a detached flShapeInfo for use in tool code. The engine calls this for you during normal editing.
Source: FontLab Proteus API documentation
findNode
findNode(arg0: QPointF) -> flNode
flNode findNode(QPointF)
Searches for the node closest to the given canvas-space point. Returns the nearest flNode, or Nothing if no nodes exist.
Source: FontLab Proteus API documentation
getContoursInfo
getContoursInfo() -> list[flObject]
QList
Returns the list of flContourInfo objects for all contours in this shape. Use this to drill down from a hit shape to individual contours.
Source: FontLab Proteus API documentation
getHitIncludedShape
getHitIncludedShape(canvas_pos: QPointF, to_bottom: Any = ...) -> Any
flShapeInfo/Nothing getHitIncludedShape(QPointF canvas_pos, double scale[, bool to_bottom=false])
Finds and returns the deepest included (component) shape that is hit at canvas_pos. Use this when the composite is made of many nested components and you need to identify which specific one was clicked.
Source: FontLab Proteus API documentation
hasAboveComposites
hasAboveComposites() -> bool
bool hasAboveComposites()
Returns True if there are composite shapes layered above (drawn on top of) this shape. Useful for z-order queries in custom draw code.
Source: FontLab Proteus API documentation
isContentLockedSibling
isContentLockedSibling() -> bool
bool isContentLockedSibling()
Returns True if this shape is a content-locked sibling in a composite group — meaning its geometry is tied to another shape and can't be edited independently.
Source: FontLab Proteus API documentation
layer
instance-attribute
layer: Any
flLayer
The layer this shape lives on.
Source: FontLab Proteus API documentation
move
move(arg0: QPointF) -> QRectF
QRectF move(QPointF)
Moves the shape on the canvas by the given offset (in canvas coordinates). Returns the updated bounding rect after the move.
Source: FontLab Proteus API documentation
ownerComposite
ownerComposite() -> flShape
flShape ownerComposite()
Returns the composite flShape that includes this shape, or Nothing if this shape is not a component of any composite.
Source: FontLab Proteus API documentation
ownerCompositeInfo
ownerCompositeInfo() -> flShapeInfo
flShapeInfo ownerCompositeInfo()
Returns the flShapeInfo of the owning composite.
Source: FontLab Proteus API documentation
pushFrontComposite
pushFrontComposite(arg0: flShapeInfo) -> Any
pushFrontComposite(flShapeInfo)
Inserts a composite child at the beginning of the chain.
Source: FontLab Proteus API documentation
replaceShape
replaceShape(arg0: flShape) -> Any
replaceShape(flShape)
Swaps the underlying flShape model object while keeping the info wrapper alive. Useful when replacing shape geometry in a tool.
Source: FontLab Proteus API documentation
shape
instance-attribute
shape: Any
flShape
The underlying flShape model object. You can replace it with any flShape to change what geometry this info represents.
Source: FontLab Proteus API documentation
takeFirstComposite
takeFirstComposite() -> flShapeInfo
flShapeInfo takeFirstComposite()
Removes and returns the first child composite from the composite list. Used when restructuring composite hierarchies programmatically.
Source: FontLab Proteus API documentation
takeLastComposite
takeLastComposite() -> flShapeInfo
flShapeInfo takeLastComposite()
Like takeFirstComposite but removes from the end.
Source: FontLab Proteus API documentation
toCanvasTransform
toCanvasTransform() -> QTransform
QTransform toCanvasTransform()
Returns the complete glyph-space → canvas-space transform for this shape.
Source: FontLab Proteus API documentation
toGlyphTransform
toGlyphTransform() -> QTransform
QTransform toGlyphTransform()
Returns the canvas-space → glyph-space transform (the inverse).
Source: FontLab Proteus API documentation