diff options
Diffstat (limited to 'graphics/src/geometry.rs')
-rw-r--r-- | graphics/src/geometry.rs | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/graphics/src/geometry.rs b/graphics/src/geometry.rs new file mode 100644 index 00000000..7cd3dd3a --- /dev/null +++ b/graphics/src/geometry.rs @@ -0,0 +1,24 @@ +//! Build and draw geometry. +pub mod fill; +pub mod path; +pub mod stroke; + +mod style; +mod text; + +pub use fill::Fill; +pub use path::Path; +pub use stroke::{LineCap, LineDash, LineJoin, Stroke}; +pub use style::Style; +pub use text::Text; + +pub use crate::gradient::{self, Gradient}; + +/// A renderer capable of drawing some [`Geometry`]. +pub trait Renderer: crate::core::Renderer { + /// The kind of geometry this renderer can draw. + type Geometry; + + /// Draws the given layers of [`Geometry`]. + fn draw(&mut self, layers: Vec<Self::Geometry>); +} |