CoordTranslate

Trait CoordTranslate 

pub trait CoordTranslate {
    type From;

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

    // Provided method
    fn depth(&self, _from: &Self::From) -> i32 { ... }
}
Available on crate feature plot only.
Expand description

The trait that translates some customized object to the backend coordinate

Required Associated Types§

type From

Specifies the object to be translated from

Required Methods§

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

Translate the guest coordinate to the guest coordinate

Provided Methods§

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

Get the Z-value of current coordinate

Implementors§

§

impl CoordTranslate for Shift

§

type From = (i32, i32)

§

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

§

type From = <C as CoordTranslate>::From

§

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

§

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

§

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

§

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