Expand description
Shared context for tool behaviors: selection, view transform, snapping.
Modules§
- align
- Pure alignment / distribution math. UI-agnostic: world-space bounds in,
world-space deltas out. Callers convert deltas to parent space and author
them via
resolve_property_editso Design stays static and Animate keys. - assets
- color
- Pure HSV <-> RGB conversion and a bounded recent-swatches ring buffer. No UI dependencies.
- context_
menu - Context-menu models and command builders. Pure.
- fill
- Helpers for finding and editing the style node that paints a shape.
- inspect
- Property inspector: descriptors, diamond state, edit commands.
- layers
- Pure layer-list helpers: tree flatten, drop targets, command builders.
- machine
- Pure state-machine authoring helpers.
- modifiers
- Command builders for adding shape modifiers to a group.
- path
- Helpers for editing animated paths at the correct frame.
- stroke
- Pure command builders for stroke dash structure.
Structs§
- FitState
- Fit-state tracker shared by the editor viewport and the player embed: remembers the last fitted surface (+ artboard) and only refits on resize or explicit invalidation, so interactive zoom survives redraws.
- Modifiers
- Selection
- Snap
Config - Tool
Context - View
Transform - Screen ↔ world mapping. Px tolerance in world units.
Functions§
- fit_
exact_ view - Exact-fit shared by presentational embeds:
artboardfillssurfacewith no margin, letterboxing inside the surface when aspects differ. No-op on degenerate inputs. - fit_
view - Margin-fit shared by the editor viewport and the player embed:
artboardinsidesurfacewith a 56 px margin, centered. No-op on degenerate inputs.