FL.objects.Node.Node

class FL.objects.Node.Node(node_or_type: Node | int | None = None, p: Point | None = None)

Bases: Copyable

__init__(node_or_type: Node | int | None = None, p: Point | None = None) None
Node()

generic constructor, creates an empty node

Node(Node)

copy constructor

Node(integer type, Point p)

creates a Node and assigns type and coordinates of the final point

Parameters:
  • node_or_type (Node | int | None, optional) – _description_. Defaults to None.

  • p (Point | None, optional) – _description_. Defaults to None.

Methods

Assign([node_or_type, p])

Assigns new values to a Node, refer to constructor for a description of possible options

ExpandLayer(masterindex)

copies positions of all points in the master 'masterindex' to other masters

Layer(masterindex)

Returns list of points for the master 'masterindex'

Section(pointindex)

Returns list of points for all layers and point number 'pointindex'

SetAllLayers(pointindex, p)

Assigns position of the point p to all masters of the point number 'pointindex'

Shift(p[, masterindex])

shifts position of all points for the master 'masterindex'

Transform(m)

Applies Matrix transformation to the Node

__init__([node_or_type, p])

Node()

fake_add_axis()

fake_deserialize(num_masters, data)

fake_remove_axis(interpolation)

fake_serialize(num_masters)

fake_update([glyph])

Is called from FontLab.UpdateFont()

Attributes

alignment

selected

type

count

parent

Nodes's parent object, Glyph

point

position of the final point of the first master

points

positions of all points of the first master

x

y

Assign(node_or_type: Node | int | None = None, p: Point | None = None) None

Assigns new values to a Node, refer to constructor for a description of possible options

ExpandLayer(masterindex: int) None

copies positions of all points in the master ‘masterindex’ to other masters

Layer(masterindex: int) list[Point]

Returns list of points for the master ‘masterindex’

Section(pointindex: int) list[Point]

Returns list of points for all layers and point number ‘pointindex’

SetAllLayers(pointindex: int, p: Point) None

Assigns position of the point p to all masters of the point number ‘pointindex’

Shift(p: Point, masterindex: int = 0) None

shifts position of all points for the master ‘masterindex’

Transform(m: Matrix) None

Applies Matrix transformation to the Node

fake_update(glyph: Glyph | None = None) None

Is called from FontLab.UpdateFont()

property parent: Glyph | None

Nodes’s parent object, Glyph

property point: Point

position of the final point of the first master

property points: ListParent[Point]

positions of all points of the first master