Wrap an existing SVG element, reading its drawing size from the viewBox
(falling back to the client width/height when no viewBox is set).
The SVG element to manage.
Create a single SVG primitive element from a spec, applying sensible
size/stroke defaults for circle and rect before the spec's own options.
The primitive to create.
The newly created (unattached) SVG element.
Create a <g> group containing every primitive in an asset spec, applying
the asset's optional uniform scale.
The asset (group of primitives) to create.
The newly created (unattached) SVG group element.
Clone an element and append it to the SVG at a fractional position.
Horizontal position as a fraction (0..1) of the SVG width.
Vertical position as a fraction (0..1) of the SVG height.
The element (typically an asset group) to stamp.
The appended clone.
Build an SVG translate(...) transform from fractional coordinates.
Horizontal position as a fraction (0..1) of the SVG width.
Vertical position as a fraction (0..1) of the SVG height.
The SVG transform string.
Manages an SVG display by creating primitives/assets from SvgElementSpec / SvgAssetSpec specs and stamping them at fractional positions over the SVG's coordinate space.