Skip to content

fontlab.flSnapObject · declarations 001

Back to fontlab.flSnapObject

distanceTo

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

double distanceTo(QPointF, uint mode)

Returns the snap distance from the given point to this object. mode is a bitmask from flSnaps.SnapMode controlling which snap geometry to use. Returns a very large number if the object is not snappable in the given mode.

Source: FontLab Proteus API documentation

getHashCode

getHashCode() -> Any

SnapHashCode getHashCode()

Returns a hash code uniquely identifying this snap object. Used internally for caching snap results so the same feature isn't queried twice per mouse move.

Source: FontLab Proteus API documentation

isExluded instance-attribute

isExluded: Any

bool

True if this object is excluded from snap calculations. (Note: the misspelling "Exluded" matches the source code.)

Source: FontLab Proteus API documentation

isGhost instance-attribute

isGhost: Any

bool: actual ghost-hint flag (read-only)

Actual native ghost-hint flag, independent of snapFlags and width sign. Also inherited by flSnapLine and flGuideLine.

Source: FontLab Proteus API documentation

isHint instance-attribute

isHint: Any

bool

True if this object represents an autohint stem.

Source: FontLab Proteus API documentation

isInUse instance-attribute

isInUse: Any

bool

True if this snap object is participating in snap calculations. Set to False to temporarily disable snapping on this feature.

Source: FontLab Proteus API documentation

isMeasurementLine instance-attribute

isMeasurementLine: Any

bool

True if this is a measurement (ruler) line rather than a structural snap target.

Source: FontLab Proteus API documentation

isPassive instance-attribute

isPassive: Any

bool

A passive snap object is a snap target (other things snap to it) but does not itself snap to others. Useful for decorative lines you want to snap to but not from.

Source: FontLab Proteus API documentation

isZone instance-attribute

isZone: Any

bool

True if this object represents an alignment zone boundary.

Source: FontLab Proteus API documentation

offsetTo

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

QPointF offsetTo(QPointF, uint mode)

Returns the vector from the given point to the nearest snap position on this object. Add this vector to the cursor position to find the snapped-to point.

Source: FontLab Proteus API documentation

reset

reset() -> Any

reset()

Clears any cached snap data for this object. Call this when the snap target moves (e.g. a node was dragged) so the cache is rebuilt on the next mouse move.

Source: FontLab Proteus API documentation

setSnapFlag

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

setSnapFlag(uint role, uint snapFlags)

Sets all snap flags for role to snapFlags. Use flSnaps.SnapLineFlags values.

Source: FontLab Proteus API documentation

setSnapFlagValue

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

setSnapFlagValue(uint role, bool)

Enables (True) or disables (False) all snap for a specific role in one call.

Source: FontLab Proteus API documentation

snapFlag

snapFlag(role: int) -> int

uint snapFlag(uint role)

Returns the snap flags for the given role. Roles partition snap behaviours: role 0 = general, role 1 = metric, etc.

Source: FontLab Proteus API documentation

snapFlags instance-attribute

snapFlags: Any

uint

The combined snap flags bitmask.

Source: FontLab Proteus API documentation

style instance-attribute

style: Any

SnapObjectsStyle

The visual style used when drawing this snap indicator on screen.

Source: FontLab Proteus API documentation