pub enum CanvasSpace {}
Expand description
The coordinate system used for graphical objects rendered to a canvas.
The convention is for the canvas/window’s top-left corner to be the origin,
with positive x
going to the right and positive y
going down the screen.
To convert from DrawingSpace
to CanvasSpace
you’ll need a
crate::components::Viewport
representing the area on the drawing the
canvas will display. The crate::window
module exposes various utility
functions for converting back and forth, with
crate::window::to_drawing_coordinates()
and
crate::window::to_canvas_coordinates()
being the most useful.
Trait Implementations§
Source§impl Clone for CanvasSpace
impl Clone for CanvasSpace
Source§fn clone(&self) -> CanvasSpace
fn clone(&self) -> CanvasSpace
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for CanvasSpace
impl Debug for CanvasSpace
Source§impl Ord for CanvasSpace
impl Ord for CanvasSpace
Source§fn cmp(&self, other: &CanvasSpace) -> Ordering
fn cmp(&self, other: &CanvasSpace) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for CanvasSpace
impl PartialEq for CanvasSpace
Source§impl PartialOrd for CanvasSpace
impl PartialOrd for CanvasSpace
impl Copy for CanvasSpace
impl Eq for CanvasSpace
impl StructuralPartialEq for CanvasSpace
Auto Trait Implementations§
impl Freeze for CanvasSpace
impl RefUnwindSafe for CanvasSpace
impl Send for CanvasSpace
impl Sync for CanvasSpace
impl Unpin for CanvasSpace
impl UnwindSafe for CanvasSpace
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more