summaryrefslogtreecommitdiffstats
path: root/graphics/src/geometry.rs
blob: 7cd3dd3a9c49fe4f6b8dd795aae3dab94634d322 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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>);
}