Expand description
Backend-agnostic SVG/vector asset IR.
usvg owns SVG normalization: XML, inherited style, transforms,
arcs, relative commands, and basic shapes are resolved before Aetna
stores anything. The renderer-facing IR below is deliberately small:
paths plus fill/stroke style. Backends can tessellate it with lyon or
feed it into more specialized vector shaders later.
Structs§
- Path
Builder - Imperative builder for a single
VectorPath. Mirrors a subset of the SVG path command vocabulary (M,L,C,Q,Z) plus fill/stroke style. Returns aVectorPath; combine multiple viaVectorAsset::from_paths. - Vector
Asset - Vector
Fill - Vector
Gradient Stop - A gradient stop. The colour is stored in linear premultiplied-friendly floats (sRGB → linear, with the per-stop opacity baked into the alpha) so vertex interpolation matches what the shader expects.
- Vector
Linear Gradient - Vector
Mesh - Vector
Mesh Options - Vector
Mesh Run - Vector
Mesh Vertex - Vector
Parse Error - Vector
Path - Vector
Radial Gradient - Vector
Stroke
Enums§
- Icon
Material - Vector
Color - Vector
Fill Rule - Vector
Gradient - A linear or radial gradient resolved to absolute SVG/viewBox space. The
stored axis/centre coordinates live in the gradient’s own coordinate
system;
absolute_to_localmaps a point in absolute SVG space back into that system so per-vertex evaluation is one matrix-multiply away. - Vector
Line Cap - Vector
Line Join - Vector
Render Mode - Render policy for app-supplied
VectorAssets. - Vector
Segment - Vector
Spread Method