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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
//! Vector → raster fallback for [`ObjectKind::Vector`] when the
//! output target is a raster pipeline.
//!
//! Only compiled with the default-on `raster` feature. Disable it
//! when the scene caller only targets vector outputs (PDF / SVG)
//! and doesn't want the rasteriser pulled in:
//!
//! ```toml
//! oxideav-scene = { version = "0.1", default-features = false }
//! ```
//!
//! For vector targets the writer (e.g. `oxideav-pdf`, `oxideav-svg`)
//! consumes the [`VectorFrame`] inside an
//! [`ObjectKind::Vector`](crate::ObjectKind::Vector) directly — no
//! rasterisation happens. This module only exists for the raster
//! path.
//!
//! The rasteriser's bitmap cache picks up `Group::cache_key`
//! (oxideav-core `04e662f`) automatically — scene callers don't
//! need to touch it.
use ;
use Renderer;
/// Rasterise `frame` to a `(width, height)` RGBA8 [`VideoFrame`]
/// suitable for compositing into a [`Canvas::Raster`](crate::Canvas)
/// pipeline. Wraps `oxideav_raster::Renderer::new(...).render(...)`
/// so callers don't need a direct dep on the rasteriser crate.
///
/// Width / height are output pixel dimensions — the caller's
/// canvas size, not the vector's intrinsic size. The rasteriser's
/// own viewport mapping handles the scale.