FL.objects.Anchor.Anchor

class FL.objects.Anchor.Anchor(anchor_or_name: Anchor | str | None = None, x: int = 0, y: int = 0)

Bases: Copyable

Anchor - class to represent Anchor point

__init__(anchor_or_name: Anchor | str | None = None, x: int = 0, y: int = 0) None

Integer values are accepted as coordinates.

Parameters:
  • anchor_or_name (Anchor | str | None, optional) – An Anchor to copy data from, or the anchor’s name as a string. Defaults to None.

  • x (int, optional) – Horizontal position of the anchor. Defaults to 0.

  • y (int, optional) – Vertical position of the anchor. Defaults to 0.

Methods

Layer(masterindex)

Returns point for the master masterindex.

SetLayer(masterindex, point)

Set the point for the master masterindex.

Transform(m)

Applies Matrix transformation to the Anchor (see Matrix)

__init__([anchor_or_name, x, y])

Integer values are accepted as coordinates.

fake_add_axis()

fake_remove_axis(interpolation)

Attributes

mark

Behaves like the mark attribute of the Glyph object

name

Anchor's name as a string

p

Position of the anchor as a Point object

parent

Anchors's parent object, Glyph

x

Horizontal position of the anchor

y

Vertical position of the anchor

Layer(masterindex: int) Point

Returns point for the master masterindex.

SetLayer(masterindex: int, point: Point) None

Set the point for the master masterindex.

Transform(m: Matrix) None

Applies Matrix transformation to the Anchor (see Matrix)

Parameters:

m (Matrix) – The transformation matrix

property mark: int

Behaves like the mark attribute of the Glyph object

Returns:

The hue in degrees of the mark color

Return type:

int

property name: str

Anchor’s name as a string

Returns:

The name

Return type:

str

property p: Point

Position of the anchor as a Point object

Returns:

The point

Return type:

Point

property parent: Glyph | None

Anchors’s parent object, Glyph

property x: int

Horizontal position of the anchor

Returns:

The x coordinate

Return type:

int

property y: int

Vertical position of the anchor

Returns:

The y coordinate

Return type:

int