Documentation
¶
Overview ¶
Package render resolves options against a style and turns the element tree into the final SVG. It bundles the option resolver, the renderer, and the metadata/escaping helpers; Generate is the single entry point the public Avatar uses.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Result ¶
Result is the outcome of rendering an avatar: the SVG, the resolved-options snapshot, and the order its keys were resolved in (for the JSON envelope).
func Generate ¶
Generate validates options, resolves them against the style, and renders the SVG. A nil options map is treated as empty. Returns an error on invalid options or a circular color reference.
Options are normalized through a JSON round-trip, so passing a Go int such as map[string]any{"size": 128} behaves the same as the JSON 128.