iced_graphics/
geometry.rs1pub mod fill;
3pub mod frame;
4pub mod path;
5pub mod stroke;
6
7mod cache;
8mod style;
9mod text;
10
11pub use cache::Cache;
12pub use fill::Fill;
13pub use frame::Frame;
14pub use path::Path;
15pub use stroke::{LineCap, LineDash, LineJoin, Stroke};
16pub use style::Style;
17pub use text::Text;
18
19pub use crate::core::{Image, Svg};
20pub use crate::gradient::{self, Gradient};
21
22use crate::cache::Cached;
23use crate::core::{self, Size};
24
25pub trait Renderer: core::Renderer {
27 type Geometry: Cached;
29
30 type Frame: frame::Backend<Geometry = Self::Geometry>;
32
33 fn new_frame(&self, size: Size) -> Self::Frame;
35
36 fn draw_geometry(&mut self, geometry: Self::Geometry);
38}
39
40#[cfg(debug_assertions)]
41impl Renderer for () {
42 type Geometry = ();
43 type Frame = ();
44
45 fn new_frame(&self, _size: Size) -> Self::Frame {}
46
47 fn draw_geometry(&mut self, _geometry: Self::Geometry) {}
48}