Export (lightningbeam-core/svg_export.rs): document_to_svg walks vector layers/groups at a given frame and emits <path> per fill (solid or gradient via <defs>) and per stroked edge. Wired into the export dialog as an "SVG" tab; written synchronously. Raster/video/effect layers are skipped (vector-only, lossless), structured for a later rasterize pass. Import (lightningbeam-editor/svg_import.rs): import_svg parses via usvg, bakes each path's absolute transform into geometry, converts segments to cubic edges, and maps solid/linear/radial paint to ShapeColor/ ShapeGradient. .svg is detected in the Ctrl+I Import handler and added as a new vector layer (keyframe at the playhead). file_types gains FileType::Vector + VECTOR_EXTENSIONS. Tests: svg_export::export_tests (core) and svg_import::tests (editor). |
||
|---|---|---|
| .. | ||
| assets | ||
| examples | ||
| src | ||
| Cargo.toml | ||
| PLAN.md | ||
| TOOL_IMPLEMENTATION_PLAN.md | ||
| build.rs | ||