fontlabapp.studios.transform_studio.model
model
Transform Studio planners: Transform, Slant, Smart Slant and selection rotate/reflect.
What: pure functions over geometry.Layer snapshots that keep the controls,
defaults, messages and maths of the Scriptmix Outline Transform, Slant,
Smart Slant, Rotate Selection and Reflect Selection H/V scripts.
Each returns geometry.Change rows (or a skip note string).
Why: the planning is testable without FontLab; session reads and writes.
Complete member index
Every captured member retains its own identity. Identical captured declaration text is linked once; this does not establish native inheritance or interchangeable objects.
| Member | Kind | Signature | Summary |
|---|---|---|---|
EMPTY_NOTE |
attribute | ||
FINITE_ANGLE |
attribute | ||
FLATTEN_ERROR |
attribute | ||
MOVE_RANGE |
attribute | ||
ORIGINS |
attribute | (shared captured text) | |
PIVOTS |
attribute | (shared captured text) | |
PRESETS |
attribute | ||
REFLECTIONS |
attribute | ||
ROTATE_DEFAULT |
attribute | ||
ROTATE_RANGE |
attribute | ||
SCALE_RANGE |
attribute | ||
SKEW_RANGE |
attribute | ||
SLANT_DEFAULT |
attribute | ||
SLANT_ERROR |
attribute | ||
SLANT_RANGE |
attribute | ||
SMART_ERROR |
attribute | ||
SMART_RANGE |
attribute | ||
layer_box |
function | (layer: Layer) -> tuple[float, float, float, float] | None |
<code>(x, y, w, h)</code><code> of the own outlines and component boxes, like </code><code>layer.boundingBox</code>. |
linear |
function | (sx: float, sy: float, skew: float, rotate: float) -> Affine |
Scale (percent), then skew (degrees), then rotate (degrees, CCW). |
mapper |
function | (lin: Affine, origin: tuple[float, float], move: tuple[float, float]) -> Affine |
<code>lin</code><code> around </code><code>origin</code>, then the move. |
origin_of |
function | (layer: Layer, choice: int) -> tuple[float, float] | None |
The transform origin for <code>ORIGINS[choice]</code>; None when a box is needed but the layer is empty. |
rotation_linear |
function | (angle: float) -> Affine |
The linear part of a counter-clockwise rotation by <code>angle</code> degrees (Rotate Selection). |
selection_changes |
function | (layer: Layer, lin: Affine) -> list[Change] |
Rotate or reflect the selected nodes and components about the selection centre. |
selection_matrix |
function | (lin: Affine, origin: tuple[float, float]) -> Affine |
|
slant_changes |
function | (layer: Layer, angle: float, pivot_y: float, anchors: bool) -> list[Change] |
|
slant_matrix |
function | (angle: float, pivot_y: float) -> Affine |
|
smart_changes |
function | (layer: Layer, angle: float, sidebearings: bool, anchors: bool) -> list[Change] | str |
Smart Slant: shear about a third of the ink height, then keep sidebearings or the ink centre. |
smart_check |
function | (angle: float) -> None |
|
transform_planner_changes |
function | (layer: Layer, lin: Affine, choice: int, move: tuple[float, float], anchors: bool) -> list[Change] | str |