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

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

Required Methods§

source

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

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

Implementors§

source§

impl<'a, Coord, DB: DrawingBackend> Drawable<DB, BackendCoordOnly> for BitMapElement<'a, Coord>

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

impl<Coord, DB: DrawingBackend, A, B> Drawable<DB, BackendCoordOnly> for ComposedElement<Coord, DB, A, B>where for<'a> &'a A: PointCollection<'a, BackendCoord>, for<'b> &'b B: PointCollection<'b, BackendCoord>, A: Drawable<DB>, B: Drawable<DB>,

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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