Trait Drawable

pub trait Drawable<DB, CM = BackendCoordOnly>
where DB: DrawingBackend, CM: CoordMapper,
{ // Required method fn draw<I>( &self, pos: I, backend: &mut DB, parent_dim: (u32, u32), ) -> Result<(), DrawingErrorKind<<DB as DrawingBackend>::ErrorType>> where I: Iterator<Item = <CM as CoordMapper>::Output>; }
Expand description

The trait indicates we are able to draw it on a drawing area

Required Methods§

fn draw<I>( &self, pos: I, backend: &mut DB, parent_dim: (u32, u32), ) -> Result<(), DrawingErrorKind<<DB as DrawingBackend>::ErrorType>>
where I: Iterator<Item = <CM as CoordMapper>::Output>,

Actually draws the element. The key points is already translated into the image coordinate and can be used by DC directly

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

§

impl<'a, Coord, DB, T> Drawable<DB> for MultiLineText<'a, Coord, T>
where Coord: 'a, DB: DrawingBackend, T: Borrow<str>,

§

impl<'a, Coord, DB, T> Drawable<DB> for Text<'a, Coord, T>
where Coord: 'a, DB: DrawingBackend, T: Borrow<str>,

§

impl<'a, DB, Coord> Drawable<DB> for DynElement<'a, DB, Coord>
where DB: DrawingBackend, Coord: Clone,

§

impl<'a, DB, Label> Drawable<DB> for Pie<'a, (i32, i32), Label>
where DB: DrawingBackend, Label: Display,

§

impl<Coord, DB> Drawable<DB> for EmptyElement<Coord, DB>
where DB: DrawingBackend,

§

impl<Coord, DB> Drawable<DB> for PathElement<Coord>
where DB: DrawingBackend,

§

impl<Coord, DB> Drawable<DB> for Pixel<Coord>
where DB: DrawingBackend,

§

impl<Coord, DB> Drawable<DB> for Polygon<Coord>
where DB: DrawingBackend,

§

impl<Coord, DB> Drawable<DB> for Rectangle<Coord>
where DB: DrawingBackend,

§

impl<Coord, DB, A, B> Drawable<DB> for ComposedElement<Coord, DB, A, B>
where DB: DrawingBackend, &'a A: for<'a> PointCollection<'a, (i32, i32)>, &'b B: for<'b> PointCollection<'b, (i32, i32)>, A: Drawable<DB>, B: Drawable<DB>,

§

impl<Coord, DB, Size> Drawable<DB> for Circle<Coord, Size>
where DB: DrawingBackend, Size: SizeDesc,

§

impl<Coord, DB, Size> Drawable<DB> for Cross<Coord, Size>
where DB: DrawingBackend, Size: SizeDesc,

§

impl<Coord, DB, Size> Drawable<DB> for TriangleMarker<Coord, Size>
where DB: DrawingBackend, Size: SizeDesc,

§

impl<I0, Size, DB> Drawable<DB> for DashedPathElement<I0, Size>
where I0: Iterator + Clone, Size: SizeDesc, DB: DrawingBackend,

§

impl<I0, Size, DB, Marker> Drawable<DB> for DottedPathElement<I0, Size, Marker>
where I0: Iterator + Clone, Size: SizeDesc, DB: DrawingBackend, Marker: IntoDynElement<'static, DB, (i32, i32)>,

§

impl<K, DB, O> Drawable<DB> for Boxplot<K, O>
where DB: DrawingBackend, O: BoxplotOrient<K, f32>,

§

impl<K, V, O, DB> Drawable<DB> for ErrorBar<K, V, O>
where O: ErrorBarOrient<K, V>, DB: DrawingBackend,

§

impl<X, Y, DB> Drawable<DB> for CandleStick<X, Y>
where Y: PartialOrd, DB: DrawingBackend,

§

impl<X, Y, Z, DB> Drawable<DB, BackendCoordAndZ> for Cubiod<X, Y, Z>
where DB: DrawingBackend,