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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
//! A time-based composition model for oxideav.
//!
//! The type surface (scene, objects, animations, time-base) is in
//! place, and concrete per-object rendering lands here piecemeal.
//! [`StubRenderer`] remains as the always-`Error::Unsupported`
//! placeholder for downstream code that only needs the trait shape.
//!
//! Two concrete renderers exist:
//!
//! - [`text::TextRenderer`] composites a single [`TextRun`] onto a
//! straight-alpha RGBA framebuffer via [`oxideav_scribe`] (TrueType
//! shaping + scanline rasterisation). The caller supplies the
//! [`oxideav_scribe::Face`]; scene-level font discovery is out of
//! scope.
//! - [`raster_renderer::RasterRenderer`] implements the full
//! [`SceneRenderer`] driver: it walks [`Scene::sampled_at`] in paint
//! order and composites the *vector* slice of a scene — backgrounds,
//! [`object::Shape`]s, and [`ObjectKind::Vector`] objects — into an
//! RGBA8 [`oxideav_core::VideoFrame`] through
//! [`oxideav_raster::Renderer`], honouring per-object transform,
//! opacity, and clip. Resource-backed kinds (image / video / live /
//! text / group) are skipped pending a font-registry / decoder-aware
//! renderer.
//!
//! See [`README.md`](../README.md) for the full design + the three
//! target use cases (PDF pages, RTMP streaming compositor, NLE
//! timeline).
//!
//! # Quick tour
//!
//! ```no_run
//! use oxideav_scene::{Scene, Canvas, SceneDuration, SceneObject};
//! use oxideav_core::TimeBase;
//!
//! let scene = Scene {
//! canvas: Canvas::raster(1920, 1080),
//! duration: SceneDuration::Finite(30_000),
//! time_base: TimeBase::new(1, 1_000),
//! sample_rate: 48_000,
//! ..Scene::default()
//! };
//! assert_eq!(scene.canvas.raster_size(), Some((1920, 1080)));
//! ```
//!
//! The hierarchy:
//!
//! - [`Scene`] — root container. Has a [`Canvas`], a [`SceneDuration`],
//! and a vector of [`SceneObject`]s.
//! - [`SceneObject`] — one element on the scene. Carries a
//! [`Transform`], a [`Lifetime`], a list of [`Animation`]s, a blend
//! mode + effects chain, and an [`ObjectKind`] payload.
//! - [`Animation`] — a per-property keyframe track. Each
//! [`Keyframe`] pins a value at a point in time; consecutive
//! keyframes interpolate via [`Easing`].
//! - [`AudioCue`] — timeline-triggered audio with an animated volume
//! envelope.
//! - [`SceneRenderer`] / [`SceneSampler`] — traits the renderer
//! implements. [`raster_renderer::RasterRenderer`] is the concrete
//! driver for the vector slice; [`StubRenderer`] is the
//! always-`Error::Unsupported` placeholder.
// `raster` was previously gated behind the `raster` cargo feature; with
// the round-2 text-pipeline migration `oxideav-raster` is a hard
// dependency (text rendering goes through it), so the gate is dropped
// here too. The `raster` cargo feature is preserved as a no-op for
// back-compat.
pub use ;
pub use ;
pub use ;
pub use ;
pub use ObjectId;
pub use ;
pub use ;
pub use Page;
pub use ;
pub use rasterize_vector;
pub use RasterRenderer;
pub use ;
pub use ;
pub use ;
pub use ;
pub use TextRenderer;