mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-10-14 19:26:56 -04:00
M2/M8/M9/M4.4: drawing + transform tools, live effects, PDF export/import, file/batch commands; UI restyled to measured Illustrator metrics (Medium Dark, categorized toolbar, hint bar, task bar, Layers)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
d0007a604d
commit
6d21d36d16
64 files changed
+11318
-865
No files matched your search
@@ -49,7 +49,13 @@ struct File {
|
||||
/// Serialize a document (pretty = human-diffable).
|
||||
pub fn save(doc: &Document, pretty: bool) -> Vec<u8> {
|
||||
let images = doc.images.iter().map(|(k, b)| (k.clone(), Image { mime: b.mime.clone(), data: base64_encode(&b.bytes) })).collect();
|
||||
let f = File { format: "drawcraft".into(), version: VERSION, generator: format!("DrawCraft {}", env!("CARGO_PKG_VERSION")), document: doc.clone(), images };
|
||||
let f = File {
|
||||
format: "drawcraft".into(),
|
||||
version: VERSION,
|
||||
generator: format!("DrawCraft {}", env!("CARGO_PKG_VERSION")),
|
||||
document: doc.clone(),
|
||||
images,
|
||||
};
|
||||
if pretty { serde_json::to_vec_pretty(&f).unwrap_or_default() } else { serde_json::to_vec(&f).unwrap_or_default() }
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user