1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
//! The `RasterBackend` trait — the swappable seam between scene and pixels.
//!
//! No backend-specific types (e.g. tiny-skia) appear anywhere in this module.
use ;
use Scene;
use crateRenderError;
/// A rasterized image in straight-alpha RGBA8 format (row-major).
///
/// Pixels are stored as `[r, g, b, a, r, g, b, a, …]` with row stride
/// `width * 4`. Alpha is **straight** (un-premultiplied), matching the
/// `Color` type in `zenith-scene`.
/// Trait that abstracts over different CPU rasterization backends.
///
/// The associated methods take and return only types from this crate or the
/// standard library — no backend-specific types cross the boundary.