pub struct Cartesian2d<X, Y>where
    X: Ranged,
    Y: Ranged,
{ /* private fields */ }
Expand description

A 2D Cartesian coordinate system described by two 1D ranged coordinate specs.

Implementations

Create a new 2D cartesian coordinate system

  • logic_x and logic_y : The description for the 1D coordinate system
  • actual: The pixel range on the screen for this coordinate system

Draw the mesh for the coordinate system

Get the range of X axis

Get the range of Y axis

Get the horizental backend coordinate range where X axis should be drawn

Get the vertical backend coordinate range where Y axis should be drawn

Get the 1D coordinate spec for X axis

Get the 1D coordinate spec for Y axis

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Specifies the object to be translated from
Translate the guest coordinate to the guest coordinate
Get the Z-value of current coordinate
Reverse translate the coordinate from the drawing coordinate to the logic coordinate. Note: the return value is an option, because it’s possible that the drawing coordinate isn’t able to be represented in te guest coordinate system Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.