pub enum Origin {
TopLeft,
BottomLeft,
}Expand description
Coordinate system origin location
Determines where (0,0) is located on the display.
§Examples
use unicorn_hat::Origin;
let origin = Origin::TopLeft; // Default: (0,0) at top-left
let origin = Origin::BottomLeft; // (0,0) at bottom-left (useful for bar graphs)Variants§
TopLeft
Origin at top-left, Y increases downward (default)
(0,0) ──────► (7,0)
│
▼
(0,7) (7,7)BottomLeft
Origin at bottom-left, Y increases upward
Useful for bar graphs and charts where Y represents a value.
(0,7) (7,7)
▲
│
(0,0) ──────► (7,0)Implementations§
Trait Implementations§
impl Copy for Origin
impl Eq for Origin
impl StructuralPartialEq for Origin
Auto Trait Implementations§
impl Freeze for Origin
impl RefUnwindSafe for Origin
impl Send for Origin
impl Sync for Origin
impl Unpin for Origin
impl UnwindSafe for Origin
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