pub enum WindowPosition {
Physical(PhysicalPosition),
Logical(LogicalPosition),
}
Expand description
The position of the window in either physical or logical pixels. This is used
with Window::set_position
.
Variants§
Physical(PhysicalPosition)
The position in physical pixels.
Logical(LogicalPosition)
The position in logical pixels.
Implementations§
Source§impl WindowPosition
impl WindowPosition
Sourcepub fn to_physical(&self, scale_factor: f32) -> PhysicalPosition
pub fn to_physical(&self, scale_factor: f32) -> PhysicalPosition
Turn the WindowPosition
into a PhysicalPosition
.
Trait Implementations§
Source§impl Clone for WindowPosition
impl Clone for WindowPosition
Source§fn clone(&self) -> WindowPosition
fn clone(&self) -> WindowPosition
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 WindowPosition
impl Debug for WindowPosition
Source§impl From<LogicalPosition> for WindowPosition
impl From<LogicalPosition> for WindowPosition
Source§fn from(value: LogicalPosition) -> Self
fn from(value: LogicalPosition) -> Self
Converts to this type from the input type.
Source§impl From<PhysicalPosition> for WindowPosition
impl From<PhysicalPosition> for WindowPosition
Source§fn from(value: PhysicalPosition) -> Self
fn from(value: PhysicalPosition) -> Self
Converts to this type from the input type.
Source§impl PartialEq for WindowPosition
impl PartialEq for WindowPosition
impl StructuralPartialEq for WindowPosition
Auto Trait Implementations§
impl Freeze for WindowPosition
impl RefUnwindSafe for WindowPosition
impl Send for WindowPosition
impl Sync for WindowPosition
impl Unpin for WindowPosition
impl UnwindSafe for WindowPosition
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