Expand description
Paint pass — walks the BoxTree post-layout and paints each node.
Order per node (top-down):
- canvas.save()
- apply transform (CSS
transform→ Skia matrix) - open opacity layer if
opacity < 1.0 - clip to padding-box if
overflow != visible - paint outset box-shadow
- paint background
- paint border (border-radius aware)
- delegate component-specific paint via
PaintDispatcher - recurse children sorted by z-index
- canvas.restore()
The dispatcher hook lets the higher-level crate plug component-specific
paint without coupling rustmotion-core to all 51 component types.
Structs§
- Enriched
Hit - A hit enriched with a component kind label, ready for the studio overlay.
node_idis stable within a single rendered frame. - HitNode
- One clickable node: its layout id and on-screen bounding box.
- HitRect
- Axis-aligned bounding box of a painted node, in device (video-pixel) coords.
- Noop
Dispatcher - No-op dispatcher (useful for tests where only generic box decoration is exercised).
- Paint
Frame - Frame-level paint context (timing + viewport).
- Plane
Camera - Scene camera resolved at a fixed time, ready for per-plane application.
Traits§
- Paint
Dispatcher - Hook to delegate component-specific painting. Implemented by the
higher-level crate that owns the actual
Componentenum.
Functions§
- paint_
tree - Paint a fully-laid-out box tree onto a Skia canvas.
- paint_
tree_ with_ hits - Like
paint_treebut also returns the per-frame hit-map: the on-screen bounding box of every component-backed node, in paint order. Used by the studio for click-to-select; the video render path usespaint_tree. - parse_
color
Type Aliases§
- HitMap
- Hit-test map for a single painted frame, in paint order (so later entries are visually on top).