Renders an AutoCAD hatch gradient preview as a complete SVG document string.
The method uses native SVG linear/radial gradients where possible and approximates AutoCAD-only gradient shapes with mirrored stops or offset radial centers.
AutoCAD gradient name.
Optional preview style and size settings.
Standalone SVG markup that can be injected directly into DOM or
saved as a .svg asset.
Renders a PAT pattern preview as a complete SVG document string.
The method applies option defaults, computes an automatic unit-to-pixel scale, transforms the pattern to screen space, and combines all line families into one grouped stroke layer over a background rectangle.
Pattern definition to render.
Optional preview style and size settings.
Standalone SVG markup that can be injected directly into DOM or
saved as a .svg asset.
Renders an AcDbPatPattern into a standalone SVG preview string.
The renderer normalizes pattern units to pixels, expands each hatch line family to cover the viewport, resolves dash/gap sequences into explicit segments, and emits a compact
<svg>document.