Skip to content

fontlabapp.fontui.teaching_writers.node_slope_and_handles · declarations 001

Back to fontlabapp.fontui.teaching_writers.node_slope_and_handles

KEY module-attribute

KEY

MODES module-attribute

MODES

Move module-attribute

Move

Position module-attribute

Position

READBACK_TOLERANCE module-attribute

READBACK_TOLERANCE

TITLE module-attribute

TITLE

Targets module-attribute

Targets

carry_handles

carry_handles(contours: list[ContourSnapshot], moves: Targets) -> Targets

Carry adjacent unselected off-curves with their moved on-curve owner.

changes

changes(layer: Any, mode: str, first: float, second: float, top: bool, flip: bool) -> list[Change]

Keep unsafe items as rows and plan the remaining contour coordinates.

coordinate_rows

coordinate_rows(contours: list[ContourSnapshot], moves: Targets) -> list[Change]

Show one exact old/planned coordinate pair per changed native node.

handle_moves

handle_moves(contour: Any, mode: str, first: float, second: float) -> list[Move]

Resolve positional handle targets against one retained node snapshot.

handle_targets

handle_targets(contour: ContourSnapshot, mode: str, first: float, second: float) -> dict[int, tuple[float, float]]

Keep tangent rays; key proportional or Hobby targets by node index.

hobby_ratio

hobby_ratio(theta: float, phi: float) -> float

Evaluate Hobby's tangent-angle velocity factor at unit tension.

main

main() -> Any

Show the retained panel; contain native read and deadline errors.

panel_type

panel_type() -> type

Build the non-modal App panel only inside the native host.

proportions

proportions(contour: Any) -> tuple[float, float]

Read one selected cubic's handle lengths relative to its chord.

segment_indices

segment_indices(contour: ContourSnapshot) -> list[tuple[int, ...]]

Find cubic spans by position within the retained ordered snapshot.

segments

segments(contour: Any) -> list[list[Any]]

Read selected cubic spans, including a closed contour's wrapped span.

selected_contours

selected_contours() -> list[Any]

Read one current layer for Copy actions; refuse ambiguous selections.

slope_moves

slope_moves(nodes: list[Any], value: float, top: bool, flip: bool) -> list[Move]

Resolve positional slope targets against this exact node snapshot.

slope_of

slope_of(nodes: list[Any]) -> float

Measure dx/dy between the lowest and highest selected nodes.

slope_targets

slope_targets(nodes: dict[Position, Any], value: float, top: bool, flip: bool) -> Targets

Key selected-node slope targets by contour/node positions, keeping y.

snapshot_contour

snapshot_contour(contour: Any) -> ContourSnapshot

Read each native node getter once; reuse an existing snapshot unchanged.