pub struct Point {
pub x: f32,
pub y: f32,
}Expand description
A position in two dimensions, in logical pixels. Compose’s Offset.
Fields§
§x: f32Horizontal coordinate, in logical pixels, growing to the right.
y: f32Vertical coordinate, in logical pixels, growing downward.
Implementations§
Trait Implementations§
impl Copy for Point
Source§impl RenderHash for Point
impl RenderHash for Point
Source§fn render_hash(&self) -> u64
fn render_hash(&self) -> u64
Returns a hash over exactly the values that change what is drawn. Equal values give equal
hashes.
Source§impl SpringScalar for Point
impl SpringScalar for Point
Source§const DIMENSIONS: usize = 2
const DIMENSIONS: usize = 2
Number of animated dimensions (1..=4).
Source§fn from_dimensions(dimensions: [f32; 4]) -> Point
fn from_dimensions(dimensions: [f32; 4]) -> Point
Rebuilds a value from per-dimension floats (indices beyond
Self::DIMENSIONS are ignored).impl StructuralPartialEq for Point
Auto Trait Implementations§
impl Freeze for Point
impl RefUnwindSafe for Point
impl Send for Point
impl Sync for Point
impl Unpin for Point
impl UnsafeUnpin for Point
impl UnwindSafe for Point
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more