✨ SVG to Cairo Code Converter
SVGenerator is a tool to convert SVG files to Cairo code that outputs the SVG file.
SVG groups <g id="group1"> .. </g> will produce a specific Cairo function
fn print_group1(ref svg, data: @Data) { .. }The SVG can be annotated with @@var_name@@ to allow data to be added dynamically in Cairo.
To build the project, run:
cargo buildTo convert a (annotated) SVG file to Cairo:
cargo run --generate path/to/yourfile.svgTo escape quotation marks ".."
cargo run -- generate path/to/yourfile.svg --escaped
cargo run -- generate path/to/yourfile.svg -eTo visualize the SVG grouping structure:
cargo run -- groups path/to/yourfile.svgThis project is licensed under the APACHE 2 license. See LICENSE for more information.