Skip to main content

Crate renamite_model

Crate renamite_model 

Source
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§

AnimatedDash
AssetId
ClipPath
Color
CompId
Composition
CompoundPath
Multi-contour geometry: boolean results and stroke expansions produce outer contours plus holes, which one VectorPath cannot represent.
DashSample
Document
FontAsset
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/end before baking vertex colors.
GradientStop
One color anchor along a gradient axis. offset is in 0..=1.
GradientStops
Ordered gradient stops, sampled by sample. Kept small (usually 2-4).
ImageAsset
An embedded image asset. Stores the original encoded PNG/JPEG/WebP bytes and the decoded pixel dimensions established at import time.
KeyframeData
Serialized keyframe (for RestoreKeyframe / undo).
LayerProps
MaskProps
Node
NodeId
NodeTransformContext
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.
PropPath
Scene
SceneItem
StrokeSample
TextNode
TimeMap

Enums§

Asset
BlendMode
FillRule
GradientKind
ModelError
ModifierKind
NodeKind
PaintKind
Parent
PropMut
PropRef
ScenePaint
Resolved, per-frame paint attached to a scene item. The renderer bakes this into mesh vertex colors at tessellation time.
ShapeKind
StarKind
StrokeCap
StrokeJoin
StyleKind
StylePaint
Paint on a style node: solid color or gradient. Animated so whole-list keyframes (e.g. stop-color morphs) work through the existing machinery.
TextAlign
Horizontal alignment of each line within the text block.
TrimMode
How Trim distributes [start, end] across multiple accumulated paths.
Value

Traits§

PropReader
PropValue
PropVisitor

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 via SceneItem).
immediate_child_below
Return the immediate child of ancestor that contains descendant.
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 picked belongs 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 any shape.* 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.

Type Aliases§

AssetMap
CompMap
NodeMap