AUDIO
Source snapshot · 11 November 2026

Owned SVG image import

Consumer and validation

The complete tutorial imports the first-party outlined logo and authored gradient/ arc/clip/opacity and integer-rectangle images. Rust prepares every image and uses RgbaView for explicit encoded premultiplied-to-straight conversion; JavaScript only presents the resulting bytes. Native labelled source/fit/size controls send bounded local messages, with complete model replacement and monotonic revision. Its18 fixed snapshots are each<65536 bytes, using base64 with128×64,96×48 or160×48 pixels. Rejected transitions retain the admitted model/image. This teaching bridge accepts only its exact compact one-field messages and is not a general JSON API.

cargo test -p ravet-surface --features svg-image --test svg_image --locked
cargo run -p ravet-examples --bin svg_workspace --no-default-features --features svg-image --locked -- --export
cargo run -p ravet-examples --bin svg_workspace --features svg-image --locked
cargo run -p ravet-examples --bin svg_workspace --features svg-image --locked -- --fixture

Native mode requires macOS/live-ui; export creates no window. Standalone mode keeps the default title-bar Audio/MIDI settings popup; this image consumer reports no owned devices. Embedded plug-in routing remains host-owned. The explicit owned hidden WK fixture checks18 actual Rust image/control transitions against a separate native SVG-image raster oracle, invalid transition retention, three measured resizes/focus, popup and parent/editor/context cleanup. Synthetic native DOM events prove transport rather than trusted human interaction.

The first-party fixture provenance and source tests cover ownership, exact capacities, viewport fitting, all path families, style inheritance, transforms, gradients, clipping, opacity and resource rejections. Browser/WK oracle comparison does not call resvg or its export path. Aligned integer rectangles compare exact bytes; other fixtures require mean absolute component error<=3, <=5% pixels with component error>32, ink bounds<=2 pixels and nonblank ink ratio0.95..1.05. These are fixture tolerances, not a general SVG fidelity guarantee. Trusted browser source/fit/size keys use a separately owned frontend model table of Rust-prepared bytes, distinct from the actual Rust native owner. Browser picker traversal may temporarily yield document.hasFocus=false; DOM focus/image retention is distinct from native focus or screen-reader proof.