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.
- Image
Node - 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). Children are z-ordered with index 0 = top, so the first Fill wins. - 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_
supports_ opacity - Opacity multiplies into emission for every kind except masks, which only contribute a clip path and never emit paint. Modifier opacity applies to nested children (pass 3); it does not attenuate the pass-1 path effect.
- node_
supports_ prop - Full per-prop support: section gate above, then path granularity.
Anything returning false here is rejected by
prop_mut/prop_ref. - node_
supports_ section - Whether
kindhonors anything insection. Sections group paths, so one arm covers a whole feature; per-path granularity (star Burst inner radius, solid-vs-gradient color, dash presence) stays in the descriptor filter and theprop_mut/prop_refmatch arms. - node_
supports_ transform - Single source of truth for which props a node kind honors at render,
keyed by section (not path string): one
matchinstead of three parallel tables.prop_mut/prop_refconsult this, so unsupported edits fail loudly instead of writing dead values. Keep the arms in sync witheval_group/emit_style/apply_modifier. - node_
transform_ context - Resolve one attached node’s parent/world transforms.
- nodes_
bounds - Union bbox of all items belonging to
nodes(selection bounds). - outer_
select_ target - Outermost selectable container for
pickedundercomp. - pick
- Low-level geometry hit: returns the leaf shape/text/image node.
- pick_
box - Nodes whose geometry is FULLY CONTAINED in the box (rubber-band semantics).
min/maxare normalized so drags in any direction work. - pick_
box_ selectable - Rubber-band variant of
pick_selectable. - pick_
selectable - pick_
selectable_ with_ leaf - Topmost
(outer, leaf)hit underpt, skipping locked subtrees. - prop_
section_ of - Sections of
PropPaths a node kind supports, mirroring the section strings inrenamite_behavior_common::inspectdescriptors.Nonemeans the path belongs to no known section and is always rejected. - 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. Children are z-ordered with index 0 = top, so the first Stroke wins.
- visit_
prop - world_
delta_ to_ parent - Convert a world-space drag delta to a node’s parent coordinate system.