Skip to main content

Crate frust_scene

Crate frust_scene 

Source
Expand description

Layer 3: vector scene / display list, renderer-agnostic scene builder.

Scene/SceneBuilder/Command are the stable seam between widgets (layer 1+2) and the GPU backend (layer 4, frust-render). Only kurbo (geometry) and peniko (brushes/fonts) appear in this crate’s public API — vello/wgpu types are forbidden here so the render backend can be swapped later.

Structs§

CornerRadii
Per-corner radii for a rounded rectangle, in the pre-transform coordinate space.
DashPattern
A stroke’s dash pattern: an on run, an off gap, and a phase offset into that repeating cycle — all lengths in the pre-transform coordinate space.
FontHandle
Opaque wrapper around a loaded font resource (blob + collection index).
Glyph
A single positioned glyph within a GlyphRun.
GlyphRun
A run of glyphs sharing a font, size, brush, and transform.
Scene
Renderer-agnostic, immediate-mode display list.
SceneBuilder
Records paint commands into a Scene, maintaining a transform stack.
ShaderProgram
A runtime fragment-shader program (WGSL source) — the Frust analog of Flutter’s FragmentProgram.

Enums§

Command
A single paint operation recorded into a Scene.
PathStyle
How a Command::Path is rendered: filled or stroked.

Functions§

arc_path
Builds a kurbo::BezPath tracing a circular arc centered at center with the given radius, from start_angle sweeping sweep_angle (both in radians, matching kurbo::Arc’s convention: 0 = positive x-axis, positive = clockwise in a y-down coordinate space).