Skip to content

fontlab.flSnapLine · declarations 001

Back to fontlab.flSnapLine

angle instance-attribute

angle: Any

double

The line angle in degrees. 0 = horizontal, 90 = vertical

Source: FontLab Proteus API documentation

angleMode instance-attribute

angleMode: Any

SnapAngleMode

Controls how the angle is constrained during interactive editing

Source: FontLab Proteus API documentation

center instance-attribute

center: Any

flNode

The node defining the line's origin/center point

Source: FontLab Proteus API documentation

centerPoint instance-attribute

centerPoint: Any

QPointF

Center position as a plain QPointF

Source: FontLab Proteus API documentation

color instance-attribute

color: Any

QColor

Custom display color for this line

Source: FontLab Proteus API documentation

constraints instance-attribute

constraints: Any

QRectF

Rectangle limiting interactive movement; empty = no constraint

Source: FontLab Proteus API documentation

distanceTo

distanceTo(arg0: QPointF, mode: int) -> float

double distanceTo(QPointF, uint mode)

Returns the signed perpendicular distance from a point to this line. Positive means one side, negative the other. The mode parameter selects which distance metric to use (0 = default perpendicular).

Source: FontLab Proteus API documentation

expression instance-attribute

expression: Any

QString

Formula that drives the line's position (e.g. "=xHeight"). Empty string means fixed position

Source: FontLab Proteus API documentation

extLinef instance-attribute

extLinef: Any

QLineF

The extended line segment, if any

Source: FontLab Proteus API documentation

extPosition instance-attribute

extPosition: Any

double

An extended position value along the line's axis, used for non-H/V guides

Source: FontLab Proteus API documentation

extension instance-attribute

extension: Any

flNode: existing extension node, or None if absent (read-only)

Existing extension node, preserving its native ID and model. None means no extension. Read-only; also inherited by flGuideLine.

Source: FontLab Proteus API documentation

getHashCode

getHashCode() -> Any

SnapHashCode getHashCode()

Returns the snap hash for this specific line instance. Uniquely identifies this line in the snapping system's cache.

Source: FontLab Proteus API documentation

hasColor instance-attribute

hasColor: Any

bool

True if a custom color has been set

Source: FontLab Proteus API documentation

hasExpression instance-attribute

hasExpression: Any

bool

True if this line's position is driven by an expression

Source: FontLab Proteus API documentation

hasExtLine instance-attribute

hasExtLine: Any

bool

True if an extended line segment is attached

Source: FontLab Proteus API documentation

isAbsoluteMarkerPos instance-attribute

isAbsoluteMarkerPos: Any

bool

When True, measurement markers on this line use absolute coordinates

Source: FontLab Proteus API documentation

isShortGuideline instance-attribute

isShortGuideline: Any

bool

True if this is a finite-length guide rather than infinite

Source: FontLab Proteus API documentation

isSnapLine

isSnapLine(arg0: flObject) -> bool

bool isSnapLine(flObject)

Returns True if the given object is any kind of snap line (including guidelines). Use this for type checking when iterating mixed collections of objects.

Source: FontLab Proteus API documentation

length instance-attribute

length: Any

double

Visible length in font units. 0 means the line extends infinitely across the canvas

Source: FontLab Proteus API documentation

linef instance-attribute

linef: Any

QLineF

The line as a Qt QLineF segment

Source: FontLab Proteus API documentation

markers instance-attribute

markers: Any

list(flMarkerPoint)

Measurement markers attached to this line

Source: FontLab Proteus API documentation

markersStructVersion instance-attribute

markersStructVersion: Any

int

Increments when the markers list changes — use for cache invalidation

Source: FontLab Proteus API documentation

offsetTo

offsetTo(arg0: QPointF, mode: int) -> QPointF

QPointF offsetTo(QPointF, uint mode)

Returns the snap offset vector — the shortest path from the given point to the nearest position on this line. The snapping engine adds this vector to the cursor position to "pull" it onto the guide.

Source: FontLab Proteus API documentation

reset

reset() -> Any

reset()

Clears the snap state, removing any cached snap geometry. Call this when the line has moved and the snap cache needs to be rebuilt.

Source: FontLab Proteus API documentation

setSnapFlag

setSnapFlag(role: int, snapFlags: int) -> Any

setSnapFlag(uint role, uint snapFlags)

Sets the snap flags for a given role, replacing the current value. Use flSnaps.SnapLineFlags constants.

Source: FontLab Proteus API documentation

setSnapFlagValue

setSnapFlagValue(role: int, bool: Any) -> Any

setSnapFlagValue(uint role, bool)

Enables or disables all snapping for a specific role in one call without changing individual bits.

Source: FontLab Proteus API documentation

snapFlag

snapFlag(role: int) -> int

uint snapFlag(uint role)

Returns the snap flags for a given snap role. Flags control which kinds of objects snap to this line (nodes, handles, shapes, etc.). See flSnaps.SnapLineFlags for the bit meanings.

Source: FontLab Proteus API documentation

style instance-attribute

style: Any

SnapObjectsStyle

vector instance-attribute

vector: Any

flNode

The node defining the line's direction

Source: FontLab Proteus API documentation

vectorPoint instance-attribute

vectorPoint: Any

QPointF

Vector endpoint as a plain QPointF

Source: FontLab Proteus API documentation