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

pub trait Drawable<DB: DrawingBackend, CM: CoordMapper = BackendCoordOnly> {
    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

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

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

Implementors

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

fn draw<I: Iterator<Item = BackendCoord>>(
    &self,
    points: I,
    backend: &mut DB,
    _: (u32, u32)
) -> Result<(), DrawingErrorKind<DB::ErrorType>>
[src]

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

fn draw<I: Iterator<Item = BackendCoord>>(
    &self,
    points: I,
    backend: &mut DB,
    _: (u32, u32)
) -> Result<(), DrawingErrorKind<DB::ErrorType>>
[src]

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

fn draw<I: Iterator<Item = BackendCoord>>(
    &self,
    points: I,
    backend: &mut DB,
    _: (u32, u32)
) -> Result<(), DrawingErrorKind<DB::ErrorType>>
[src]

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

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

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

fn draw<I: Iterator<Item = BackendCoord>>(
    &self,
    _pos: I,
    _backend: &mut DB,
    _: (u32, u32)
) -> Result<(), DrawingErrorKind<DB::ErrorType>>
[src]

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

fn draw<I: Iterator<Item = BackendCoord>>(
    &self,
    points: I,
    backend: &mut DB,
    _: (u32, u32)
) -> Result<(), DrawingErrorKind<DB::ErrorType>>
[src]

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

fn draw<I: Iterator<Item = BackendCoord>>(
    &self,
    points: I,
    backend: &mut DB,
    _: (u32, u32)
) -> Result<(), DrawingErrorKind<DB::ErrorType>>
[src]

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

fn draw<I: Iterator<Item = BackendCoord>>(
    &self,
    points: I,
    backend: &mut DB,
    _: (u32, u32)
) -> Result<(), DrawingErrorKind<DB::ErrorType>>
[src]

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

fn draw<I: Iterator<Item = BackendCoord>>(
    &self,
    points: I,
    backend: &mut DB,
    _: (u32, u32)
) -> Result<(), DrawingErrorKind<DB::ErrorType>>
[src]

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

fn draw<I: Iterator<Item = BackendCoord>>(
    &self,
    pos: I,
    backend: &mut DB,
    ps: (u32, u32)
) -> Result<(), DrawingErrorKind<DB::ErrorType>>
[src]

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

fn draw<I: Iterator<Item = BackendCoord>>(
    &self,
    points: I,
    backend: &mut DB,
    ps: (u32, u32)
) -> Result<(), DrawingErrorKind<DB::ErrorType>>
[src]

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

fn draw<I: Iterator<Item = BackendCoord>>(
    &self,
    points: I,
    backend: &mut DB,
    ps: (u32, u32)
) -> Result<(), DrawingErrorKind<DB::ErrorType>>
[src]

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

fn draw<I: Iterator<Item = BackendCoord>>(
    &self,
    points: I,
    backend: &mut DB,
    ps: (u32, u32)
) -> Result<(), DrawingErrorKind<DB::ErrorType>>
[src]

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

fn draw<I: Iterator<Item = BackendCoord>>(
    &self,
    points: I,
    backend: &mut DB,
    _: (u32, u32)
) -> Result<(), DrawingErrorKind<DB::ErrorType>>
[src]

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

fn draw<I: Iterator<Item = BackendCoord>>(
    &self,
    points: I,
    backend: &mut DB,
    _: (u32, u32)
) -> Result<(), DrawingErrorKind<DB::ErrorType>>
[src]

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

fn draw<I: Iterator<Item = (BackendCoord, i32)>>(
    &self,
    points: I,
    backend: &mut DB,
    _: (u32, u32)
) -> Result<(), DrawingErrorKind<DB::ErrorType>>
[src]

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

fn draw<I: Iterator<Item = BackendCoord>>(
    &self,
    points: I,
    backend: &mut DB,
    _: (u32, u32)
) -> Result<(), DrawingErrorKind<DB::ErrorType>>
[src]