pub struct LogicalPosition(/* private fields */);
Expand description
A position represented in logical pixels.
Implementations§
source§impl LogicalPosition
impl LogicalPosition
pub fn new(x: i32, y: i32) -> Self
pub fn from_physical( physical: impl Into<PhysicalPosition>, scale_factor: f64, ) -> Self
pub fn to_physical(self, scale_factor: f64) -> PhysicalPosition
pub fn x(&self) -> i32
pub fn set_x(&self, x: i32)
pub fn y(&self) -> i32
pub fn set_y(&self, y: i32)
Trait Implementations§
source§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 From<LogicalPosition> for Position
impl From<LogicalPosition> for Position
source§fn from(pos: LogicalPosition) -> Self
fn from(pos: LogicalPosition) -> Self
Converts to this type from the input type.
source§impl PartialEq for LogicalPosition
impl PartialEq 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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)