#[repr(C)]pub struct LogicalPosition {
pub x: f32,
pub y: f32,
}
Fields§
§x: f32
§y: f32
Implementations§
Source§impl LogicalPosition
impl LogicalPosition
pub fn scale_for_dpi(&mut self, scale_factor: f32)
Source§impl LogicalPosition
impl LogicalPosition
pub const fn new(x: f32, y: f32) -> LogicalPosition
pub const fn zero() -> LogicalPosition
pub fn to_physical(self, hidpi_factor: f32) -> PhysicalPosition<u32>
Trait Implementations§
Source§impl Add for LogicalPosition
impl Add for LogicalPosition
Source§type Output = LogicalPosition
type Output = LogicalPosition
The resulting type after applying the
+
operator.Source§fn add(self, other: LogicalPosition) -> LogicalPosition
fn add(self, other: LogicalPosition) -> LogicalPosition
Performs the
+
operation. Read moreSource§impl AddAssign for LogicalPosition
impl AddAssign for LogicalPosition
Source§fn add_assign(&mut self, other: LogicalPosition)
fn add_assign(&mut self, other: LogicalPosition)
Performs the
+=
operation. Read moreSource§impl Clone for LogicalPosition
impl Clone for LogicalPosition
Source§fn clone(&self) -> LogicalPosition
fn clone(&self) -> LogicalPosition
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 LogicalPosition
impl Debug for LogicalPosition
Source§impl Default for LogicalPosition
impl Default for LogicalPosition
Source§fn default() -> LogicalPosition
fn default() -> LogicalPosition
Returns the “default value” for a type. Read more
Source§impl Display for LogicalPosition
impl Display for LogicalPosition
Source§impl Hash for LogicalPosition
impl Hash for LogicalPosition
Source§impl Ord for LogicalPosition
impl Ord for LogicalPosition
Source§fn cmp(&self, other: &LogicalPosition) -> Ordering
fn cmp(&self, other: &LogicalPosition) -> 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 LogicalPosition
impl PartialEq for LogicalPosition
Source§impl PartialOrd for LogicalPosition
impl PartialOrd for LogicalPosition
Source§impl Sub for LogicalPosition
impl Sub for LogicalPosition
Source§type Output = LogicalPosition
type Output = LogicalPosition
The resulting type after applying the
-
operator.Source§fn sub(self, other: LogicalPosition) -> LogicalPosition
fn sub(self, other: LogicalPosition) -> LogicalPosition
Performs the
-
operation. Read moreSource§impl SubAssign for LogicalPosition
impl SubAssign for LogicalPosition
Source§fn sub_assign(&mut self, other: LogicalPosition)
fn sub_assign(&mut self, other: LogicalPosition)
Performs the
-=
operation. Read moreimpl Copy for LogicalPosition
impl Eq for LogicalPosition
impl StructuralPartialEq for LogicalPosition
Auto Trait Implementations§
impl Freeze for LogicalPosition
impl RefUnwindSafe for LogicalPosition
impl Send for LogicalPosition
impl Sync for LogicalPosition
impl Unpin for LogicalPosition
impl UnwindSafe for LogicalPosition
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,
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 moreSource§impl<T> IsDefault for T
impl<T> IsDefault for T
Source§fn is_default(&self) -> bool
fn is_default(&self) -> bool
Checks that type has a default value.