Expand description
Serializable document model + pure evaluator.
Group evaluation: pass 1 accumulates shape paths and applies modifiers in
document order; pass 2 recurses/emits styles bottom-first so Scene.items
is in painter’s order. Nodes live in a slotmap arena. Tree membership is
attach/detach so undo/redo never changes a NodeId.
Structs§
- Animated
Dash - AssetId
- Clip
Path - Color
- CompId
- Composition
- Compound
Path - Multi-contour geometry: boolean results and stroke expansions produce
outer contours plus holes, which one
VectorPathcannot represent. - Dash
Sample - Document
- Font
Asset - A project font: the user-visible name, the logical family key text nodes reference, and the raw TTF/OTF bytes (saved/loaded inside the project).
- Gradient
- A gradient in the node’s local space. The evaluator folds the owning
shape’s world transform into
start/endbefore baking vertex colors. - Gradient
Stop - One color anchor along a gradient axis.
offsetis in 0..=1. - Gradient
Stops - Ordered gradient stops, sampled by
sample. Kept small (usually 2-4). - Image
Asset - An embedded image asset. Stores the original encoded PNG/JPEG/WebP bytes and the decoded pixel dimensions established at import time.
- Keyframe
Data - Serialized keyframe (for RestoreKeyframe / undo).
- Layer
Props - Mask
Props - Node
- NodeId
- Node
Transform Context - Resolved transform information for one node at an editor frame.
- Overrides
- Per-frame property patch. Produced by clip/state-machine playback,
consumed by
evaluate_with. Never touches the document. - Prop
Path - Scene
- Scene
Item - Stroke
Sample - Text
Node - TimeMap
Enums§
- Asset
- Blend
Mode - Fill
Rule - Gradient
Kind - Model
Error - Modifier
Kind - Node
Kind - Paint
Kind - Parent
- PropMut
- PropRef
- Scene
Paint - Resolved, per-frame paint attached to a scene item. The renderer bakes this into mesh vertex colors at tessellation time.
- Shape
Kind - Star
Kind - Stroke
Cap - Stroke
Join - Style
Kind - Style
Paint - Paint on a style node: solid color or gradient. Animated so whole-list keyframes (e.g. stop-color morphs) work through the existing machinery.
- Text
Align - Horizontal alignment of each line within the text block.
- Trim
Mode - How Trim distributes [start, end] across multiple accumulated paths.
- Value
Traits§
Functions§
- evaluate
- evaluate_
with - fill_
style_ for - The topmost fill style that paints
shape: the last Fill style sibling in the closest ancestor scope that has one. Used by the inspector to edit a shape’s fill (the tool instead tracks the exact style viaSceneItem). - immediate_
child_ below - Return the immediate child of
ancestorthat containsdescendant. - node_
affine - The node’s own transform as an affine, ignoring group/accumulated transforms. Gradient handles are authored in this space and folded into world space with this same affine during evaluation, so the inverse maps world gradient handles back to local coordinates for editing.
- node_
is_ ancestor - node_
transform_ context - Resolve one attached node’s parent/world transforms.
- nodes_
bounds - Union bbox of all items belonging to
nodes(selection bounds). - pick
- Topmost pickable item under
pt(world space). - pick_
box - Nodes whose geometry is FULLY CONTAINED in the box (rubber-band semantics).
- read_
prop - selected_
ancestor_ for_ pick - If
pickedbelongs to an already-selected group/layer, return that selected ancestor instead of replacing it with the leaf shape. - selection_
bounds - Union bounds of selected leaf nodes and all rendered descendants of selected groups/layers.
- shape_
path - The vector outline of a shape (or mask shape) node’s geometry in its own
local coordinate space at
frame, honoring anyshape.*overrides. - stroke_
style_ for - Topmost stroke style in the closest ancestor scope that has one.
- visit_
prop - world_
delta_ to_ parent - Convert a world-space drag delta to a node’s parent coordinate system.