[−][src]Struct embedded_graphics::unsignedcoord::UnsignedCoord
2D unsigned coordinate in screen space
As opposed to Coord
, this coordinate is unsigned. It is intended for
use with Drawable
iterators to output valid display pixel
coordinates, i.e. coordinates that are always positive.
use embedded_graphics::{unsignedcoord::UnsignedCoord, ucoord}; // Create a coord using the `new` constructor method let c1 = UnsignedCoord::new(10, 20); // Create a coord using the handy `ucoord` macro let c2 = ucoord!(10, 20); assert_eq!(c1, c2);
Note that enabling the nalgebra
feature will alias Nalgebra's Vector2<u32>
type to
UnsignedCoord
instead of this builtin implementation.
Methods
impl UnsignedCoord
[src]
Trait Implementations
impl Add<UnsignedCoord> for UnsignedCoord
[src]
type Output = UnsignedCoord
The resulting type after applying the +
operator.
fn add(self, other: UnsignedCoord) -> UnsignedCoord
[src]
impl AddAssign<UnsignedCoord> for UnsignedCoord
[src]
fn add_assign(&mut self, other: UnsignedCoord)
[src]
impl Clone for UnsignedCoord
[src]
fn clone(&self) -> UnsignedCoord
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for UnsignedCoord
[src]
impl Debug for UnsignedCoord
[src]
impl Eq for UnsignedCoord
[src]
impl<'_> From<&'_ [u32; 2]> for UnsignedCoord
[src]
impl<'_> From<&'_ UnsignedCoord> for (u32, u32)
[src]
fn from(other: &UnsignedCoord) -> (u32, u32)
[src]
impl From<[u32; 2]> for UnsignedCoord
[src]
impl From<(u32, u32)> for UnsignedCoord
[src]
impl From<UnsignedCoord> for (u32, u32)
[src]
fn from(other: UnsignedCoord) -> (u32, u32)
[src]
impl Index<usize> for UnsignedCoord
[src]
impl Neg for UnsignedCoord
[src]
type Output = Coord
The resulting type after applying the -
operator.
fn neg(self) -> Self::Output
[src]
impl PartialEq<UnsignedCoord> for UnsignedCoord
[src]
fn eq(&self, other: &UnsignedCoord) -> bool
[src]
fn ne(&self, other: &UnsignedCoord) -> bool
[src]
impl StructuralEq for UnsignedCoord
[src]
impl StructuralPartialEq for UnsignedCoord
[src]
impl Sub<UnsignedCoord> for UnsignedCoord
[src]
type Output = UnsignedCoord
The resulting type after applying the -
operator.
fn sub(self, other: UnsignedCoord) -> UnsignedCoord
[src]
impl SubAssign<UnsignedCoord> for UnsignedCoord
[src]
fn sub_assign(&mut self, other: UnsignedCoord)
[src]
impl ToSigned for UnsignedCoord
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,