widgetkit_render/lib.rs
1//! Stable render surface: `Canvas`, text styles, and the software renderer.
2//!
3//! The command/frame pipeline is intentionally exposed only through [`unstable`]. It exists so
4//! WidgetKit can evolve renderer backends and tests without treating raw render internals as a
5//! stable application-facing contract.
6
7mod canvas;
8mod frame;
9mod model;
10mod raster;
11mod style;
12mod surface;
13mod text;
14
15pub use canvas::Canvas;
16pub use style::{Stroke, TextAlign, TextBaseline, TextMetrics, TextStyle};
17pub use surface::{RenderSurface, Renderer, SoftwareRenderer};
18
19pub mod unstable {
20 //! Unstable render internals.
21 //!
22 //! These types model WidgetKit's low-level frame and command pipeline. They are public so
23 //! renderer experiments and tests can use them, but they are not part of the stable `Canvas`
24 //! API and may change in any `0.x` release.
25
26 pub use crate::canvas::RawCanvas;
27 pub use crate::model::{
28 ClearCommand, ClipCommand, ClipPrimitive, Fill, FillCommand, FillShape, ImageCommand,
29 ImageSource, Paint, RenderCommand, RenderFrame, StateCommand, StrokeCommand, StrokeShape,
30 TextCommand, Transform, TransformCommand,
31 };
32}
33
34#[cfg(test)]
35mod tests;