Trait plotters::coord::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§

source

type From

Specifies the object to be translated from

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)