[][src]Trait plotters::element::Drawable

pub trait Drawable<DB: DrawingBackend> {
    fn draw<I: Iterator<Item = BackendCoord>>(
        &self,
        pos: I,
        backend: &mut DB,
        parent_dim: (u32, u32)
    ) -> Result<(), DrawingErrorKind<DB::ErrorType>>; }

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

Required methods

fn draw<I: Iterator<Item = BackendCoord>>(
    &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

Loading content...

Implementors

impl<'a, Coord, DB: DrawingBackend> Drawable<DB> for BitMapElement<'a, Coord>[src]

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

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

impl<'a, DB: DrawingBackend, Coord: Clone> Drawable<DB> for DynElement<'a, DB, Coord>[src]

impl<Coord, DB: DrawingBackend> Drawable<DB> for EmptyElement<Coord, DB>[src]

impl<Coord, DB: DrawingBackend> Drawable<DB> for PathElement<Coord>[src]

impl<Coord, DB: DrawingBackend> Drawable<DB> for Pixel<Coord>[src]

impl<Coord, DB: DrawingBackend> Drawable<DB> for Polygon<Coord>[src]

impl<Coord, DB: DrawingBackend> Drawable<DB> for Rectangle<Coord>[src]

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

impl<Coord, DB: DrawingBackend, Size: SizeDesc> Drawable<DB> for Circle<Coord, Size>[src]

impl<Coord, DB: DrawingBackend, Size: SizeDesc> Drawable<DB> for Cross<Coord, Size>[src]

impl<Coord, DB: DrawingBackend, Size: SizeDesc> Drawable<DB> for TriangleMarker<Coord, Size>[src]

impl<K, DB: DrawingBackend, O: BoxplotOrient<K, f32>> Drawable<DB> for Boxplot<K, O>[src]

impl<K, V, O: ErrorBarOrient<K, V>, DB: DrawingBackend> Drawable<DB> for ErrorBar<K, V, O>[src]

impl<X, Y: PartialOrd, DB: DrawingBackend> Drawable<DB> for CandleStick<X, Y>[src]

Loading content...