FL.objects.Point.Point

class FL.objects.Point.Point(p_or_x: Point | float | None = None, y: float | None = None)

Bases: Copyable

__init__(p_or_x: Point | float | None = None, y: float | None = None) None

Point - base class to represent point

Point()

generic constructor, creates a Point with zero coordinates

Point(Point)

copy constructor

Point(x, y)

creates a Point and assigns coordinates. x and y may be integer or float

Parameters:
  • p_or_x (Point | float | None, optional) – The Point to copy coordinates from, or the x coordinate. Defaults to None.

  • y (float | None, optional) – The y coordinate. Defaults to None.

Methods

Add(p)

Same as Shift(Point p)

Assign(p_or_x[, y])

Assigns new values to a Point

Mul(s)

Multiplies Point's position to s value

Shift(p_or_x[, y])

Shifts Point on a position defined by p or x and y values

Sub(p)

Subtracts p coordinates from the current Point

Transform(m)

Applies Matrix transformation to the Point

__init__([p_or_x, y])

Point - base class to represent point

fake_update([parent])

Is called from FontLab.UpdateFont()

Attributes

parent

Point's parent object

x

Horizontal position of the point

y

Vertical position of the point

Add(p: Point) None

Same as Shift(Point p)

Assign(p_or_x: Point | float, y: float | None = None) None

Assigns new values to a Point

Mul(s: float) None

Multiplies Point’s position to s value

Shift(p_or_x: Point | float, y: float | None = None) None

Shifts Point on a position defined by p or x and y values

Sub(p: Point) None

Subtracts p coordinates from the current Point

Transform(m: Matrix) None

Applies Matrix transformation to the Point

fake_update(parent: Any | None = None) None

Is called from FontLab.UpdateFont()

property parent: Any

Point’s parent object

property x: float

Horizontal position of the point

Returns:

The x coordinate

Return type:

float

property y: float

Vertical position of the point

Returns:

The y coordinate

Return type:

float