Overview
graphitepdf-svg parses SVG input into a typed SvgNode tree that downstream crates can inspect, size, transform, and render.
Scope
graphitepdf-svg contains:
SvgNodeandSvgNodeKindSvgPropsfor normalized attribute storagetry_parse_svg()andparse_svg()entry points- typed tree output rather than raw XML strings
Installation
API Summary
| Category | Items |
|---|---|
| SVG tree | SvgNode, SvgNodeKind, SvgProps |
| Parsing | try_parse_svg(), parse_svg() |
Example
use try_parse_svg;
Design Principles
- expose parsed SVG as typed scene data
- keep parsing fallible and explicit
- avoid baking in PDF emission concerns
- make downstream sizing and rendering easier by normalizing structure early
Role In GraphitePDF
This crate is the workspace's SVG scene layer. It feeds image, math, layout, render, and kit.
License
MIT