initial svg support

This commit is contained in:
2025-10-23 09:40:08 +02:00
parent 88d188a794
commit 6e6aa8b27e
10 changed files with 309 additions and 10 deletions
+20
View File
@@ -0,0 +1,20 @@
//! Export-Backend-Trait und zentrale Export-Typen
use crate::state::TurtleWorld;
#[derive(Debug)]
pub enum ExportError {
Io(std::io::Error),
Format(String),
// Weitere Formate können ergänzt werden
}
pub enum DrawingFormat {
#[cfg(feature = "svg")]
Svg,
// Weitere Formate wie Png, Pdf, ...
}
pub trait DrawingExporter {
fn export(&self, world: &TurtleWorld, filename: &str) -> Result<(), ExportError>;
}