calternal_notes_core::canvas_export
Bounded, lossless editable export metadata (DESIGN §60, #976). The renderer draws a projection; metadata always holds the original scene, including tombstones and opaque fields. No paths or resources are opened.
Source: crates/calternal-notes-core/src/canvas_export.rs
Functions
Section titled “Functions”embed_png
Section titled “embed_png”pub fn embed_png(png: &[u8], scene: &Value) -> Result<Vec<u8>, CanvasError>Insert a checked tEXt chunk before IEND. Only a renderer-produced PNG is accepted; checked lengths prevent an invalid child response indexing bytes.
Source: crates/calternal-notes-core/src/canvas_export.rs:85
embed_svg
Section titled “embed_svg”pub fn embed_svg(svg: &[u8], scene: &Value) -> Result<Vec<u8>, CanvasError>Attach an upstream-compatible SVG payload in inert base64 comments. The renderer must supply sanitized SVG; this never interpolates source markup.
Source: crates/calternal-notes-core/src/canvas_export.rs:71
preflight
Section titled “preflight”pub fn preflight(scene: &Value) -> Result<(), CanvasError>Bound both formats before starting a renderer. Padding and rotated corners count toward the raster budget. The browser checks its remeasured bounds too.