Skip to content

fontlabapp.fontui.outline_routes.round_coordinates · declarations 001

Back to fontlabapp.fontui.outline_routes.round_coordinates

KEY module-attribute

KEY

TITLE module-attribute

TITLE

main

main() -> Any

Open the panel, or replace the one that is already open.

round_changes

round_changes(layer: Any, grid: int, offsets: bool, anchors: bool = False) -> list[Change]

Rows for one layer: off-grid nodes, then component offsets, then notes.

Node edit: ("nodes", [(node, x, y)]) with x, y in shape coordinates. Offset edit: ("offset", shape, (dx, dy)).

snap

snap(value: float, grid: int) -> float

Nearest multiple of grid. Halves round up: 2.5 -> 3, -2.5 -> -2 (Qt's qRound).