Expand description
Vector drawing primitives: paths, fills, strokes, caps, and gradients.
Modules§
Structs§
- Depth
- Logical scene depth for lighting calculations.
- Fill
- One interior paint layer. Index zero in an element’s fill stack is topmost.
- Gradient
Stop - A color stop for a gradient fill, defined by a position (% or px) and a color.
- Linear
Gradient - Describes a linear gradient fill with a start and end point, and a list of color stops.
- Material
Params - Tunable response parameters for a light-reactive vector material.
- Mesh
Gradient - Smooth mesh paint with 2–8 equally sized rows, each containing 2–8 anchors.
Automatic shared Bézier controls interpolate the anchors and their premultiplied
encoded-sRGB colors. Outside the covered mesh the paint is transparent. Folded
patches replace earlier patches in row-major order. Supported by the WGPU renderer.
Animate positions/colors to morph; whole
Painttransitions remain crossfades. - Mesh
Point - A colored anchor in a
MeshGradient. Position uses ordinary pixels, percentages, or combined units, relative to the complete consumer geometry’s paint bounds. Rows describe connectivity; anchors in a row may have different y coordinates. - Radial
Gradient - A focal radial gradient, growing from
startto the circle atendwithradius. - Resolved
Material Params - Plain material coefficients for one settled drawing operation.
- Resolved
Radial Gradient - Runtime geometry shared by radial color fills and painted alpha masks. Coordinates are local logical pixels, before the element’s affine transform.
- Resolved
Stroke - Plain drawing values captured before entering a rendering backend. Backends never read live shared properties while recording a frame.
- Scene
Ambient Light - Resolved ambient light for one logical canvas layer.
- Scene
Light - Resolved light contribution for one logical canvas layer.
- Scene
Lighting - Resolved lighting state for one logical canvas layer.
- Stroke
- One centered outline layer, drawn above every interior fill. Index zero in an element’s stroke stack is topmost.
- Vector3
- A three-dimensional vector in logical scene space.
Enums§
- Light
Shape - Shape of a light contribution in logical scene space.
- Material
- Light-reactive surface response for vector primitives.
- Navigation
Target - Describes where to open new windows or tabs when navigating to a URL from a
Linknode. - Paint
- Describes how to fill vector geometry. Solid fills interpolate their RGBA channels. Other pairs crossfade sampled paints in premultiplied RGBA, preserving each gradient’s geometry and stops.
- Path
Element - Describes a single element of a vector path, such as a line, a point, or curve segment.
- Path
Smoothing - Controls optional curve smoothing for path geometry before tessellation.
- Resolved
Material - Material response with no live property handles.
- Stroke
Cap - Controls how an open stroke terminates at the exposed endpoints of a path.
- Stroke
Join - Controls how stroke segments are joined at path vertices.
Functions§
- paint_
bounds - Stable local reference frame for paint, independent of outline width and reveal. A collapsed axis gets a centered one-logical-pixel span without adding coverage.