plotters::coord

Trait CoordTranslate

Source
pub trait CoordTranslate {
    type From;

    // Required method
    fn translate(&self, from: &Self::From) -> BackendCoord;

    // Provided method
    fn depth(&self, _from: &Self::From) -> i32 { ... }
}
Expand description

The trait that translates some customized object to the backend coordinate

Required Associated Types§

Required Methods§

Source

fn translate(&self, from: &Self::From) -> BackendCoord

Translate the guest coordinate to the guest coordinate

Provided Methods§

Source

fn depth(&self, _from: &Self::From) -> i32

Get the Z-value of current coordinate

Implementors§

Source§

impl CoordTranslate for Shift

Source§

type From = (i32, i32)

Source§

impl<C, T> CoordTranslate for T
where C: CoordTranslate, T: Deref<Target = C>,

Source§

impl<X: Ranged, Y: Ranged> CoordTranslate for Cartesian2d<X, Y>

Source§

type From = (<X as Ranged>::ValueType, <Y as Ranged>::ValueType)

Source§

impl<X: Ranged, Y: Ranged, Z: Ranged> CoordTranslate for Cartesian3d<X, Y, Z>

Source§

type From = (<X as Ranged>::ValueType, <Y as Ranged>::ValueType, <Z as Ranged>::ValueType)