Export a portable SVG
Render one core Graphics scene as accessible SVG source.
Render the retained scene
SVG runs entirely in the browser. The renderer traverses the same retained scene that Canvas, TikZ, and PNG consume. Supplying alt adds accessible title and label markup to the root SVG.
Use generic .Render(scene, "image/svg+xml", options) when a target is chosen from data, or .Out("diagram.svg", scene) in a CLI script.
- Browser: complete source generation.
- CLI: no external tools.
- Options:
alt, decimalprecision, androundingpolicy.
Keep exact coordinates enclosed
Exact and certified coordinates are never silently replaced by an unqualified decimal point. The renderer retains outward decimal bounds and, when necessary, minimally expands the rendered geometry to contain them.
The guarantee is outward-exact-enclosure. Float-originated coordinates may still round messily, but are marked non-certified and never presented as an exact enclosure.
SVG also validates the complete nested Graphics tree. Unsupported nodes, Path commands, and style properties fail with a stable path such as graphic[2].group[1]; they are never silently omitted. Generic .Render can use an explicitly requested fallback target, which retains the SVG failure in its diagnostics.
Reuse paint and interaction definitions
The two rectangles share one gradient and one mask definition. The requested font is mapped to a generic family, and the viewport/selection records remain available in the render metadata.