Skip to main content

Crate dendryform_svg

Crate dendryform_svg 

Source
Expand description

§dendryform-svg

Static SVG renderer for dendryform diagrams.

Consumes a LayoutPlan and Theme to produce a self-contained SVG string with absolute pixel coordinates, embedded font imports, and the dark Taproot theme.

§Quick Start

use dendryform_core::Theme;
use dendryform_svg::render_svg;
use dendryform_layout::compute_layout;

let diagram = dendryform_parse::parse_yaml_file("examples/taproot/architecture.yaml").unwrap();
let plan = compute_layout(&diagram).unwrap();
let svg = render_svg(&plan, &Theme::dark(), 1100.0).unwrap();
std::fs::write("output.svg", svg).unwrap();

Enums§

SvgError
Errors that occur during SVG rendering.

Functions§

render_svg
Renders a layout plan and theme into a self-contained SVG string.
version
Returns the version of the dendryform-svg crate.