Scene Primitives
ScenePrimitive
Every frame is a flat list of ScenePrimitive values. There are five variants:
Custom renderers must include a wildcard arm (
_ => {}) when matchingScenePrimitive, since the enum is#[non_exhaustive].
RectPrimitive
Filled rectangle with optional stroke and rounded corners.
Used for: cell backgrounds, headers, selection rectangles, scrollbar elements.
TextPrimitive
Clipped text run with alignment.
Used for: cell values, headers, row numbers, search highlights.
LinePrimitive
Straight line segment.
Used for: grid lines, header borders, separator lines.
PolygonPrimitive
Filled convex polygon with optional rounded corners.
Used for: sort indicator arrows, scrollbar arrow buttons.
ImagePrimitive
Image loaded from a URL.
Used for: CellFormat::Image and CellFormat::ImageText cells.