FL.objects.Guide.Guide

class FL.objects.Guide.Guide(guide_or_position: Guide | int | None = None, angle: float = 0.0)

Bases: Copyable

__init__(guide_or_position: Guide | int | None = None, angle: float = 0.0) None

Guide - class to represent guideline

Guide()

generic constructor, creates a Guide with zero coordinates

Guide(Guide)

copy constructor

Guide(position)

creates a Guide and assigns position

Guide(position, angle)

creates a Guide and assigns position and width values

Parameters:
  • guide_or_position (Guide | int | None, optional) – The guide to be copied, or the position of the guide. Defaults to None.

  • angle (float, optional) – The width. Defaults to 0.0.

Methods

Transform(m)

applies Matrix transformation to the Guide

TransformLayer(m, layernum)

applies Matrix transformation to the selected layer of the Guide

__init__([guide_or_position, angle])

Guide - class to represent guideline

fake_add_axis()

fake_angle_to_width(angle)

fake_remove_axis(interpolation)

fake_width_to_angle(width)

Attributes

angle

The angle of the guideline.

parent

Guide's parent object, Glyph.

position

The position of the guideline.

positions

width

The "width" of the guideline.

widths

The "widths for each master.

Transform(m: Matrix) None

applies Matrix transformation to the Guide

Parameters:

m (Matrix) – _description_

TransformLayer(m: Matrix, layernum: int) None

applies Matrix transformation to the selected layer of the Guide

Parameters:

m (Matrix) – _description_

property angle: float

The angle of the guideline.

Returns:

The angle of the guideline in degrees for the first master

Return type:

float

property parent: Glyph | None

Guide’s parent object, Glyph. If the guide is global, parent is an orphan Glyph.

Returns:

The parent object.

Return type:

Glyph | None

property position: int

The position of the guideline. Setting the position sets the same value for all masters.

Returns:

Return position of the guideline for the first master

Return type:

int

property width: float

The “width” of the guideline. Setting the width sets the same value for all masters. Actually, the width is a representation of the angle: width = round(tan(radians(value)) * 10000)

Returns:

Return “width” of the guideline for the first master

Return type:

int

property widths: list[int]

The “widths for each master. Actually, the width is a representation of the angle: width = round(tan(radians(value)) * 10000)

Returns:

The list of “widths”

Return type:

list[int]