pub struct PhysicalPosition(/* private fields */);
Expand description
A position represented in physical pixels.
Implementations§
source§impl PhysicalPosition
impl PhysicalPosition
pub fn new(x: i32, y: i32) -> Self
pub fn from_logical( logical: impl Into<LogicalPosition>, scale_factor: f64, ) -> Self
pub fn to_logical(&self, scale_factor: f64) -> LogicalPosition
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 PhysicalPosition
impl Clone for PhysicalPosition
source§fn clone(&self) -> PhysicalPosition
fn clone(&self) -> PhysicalPosition
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 PhysicalPosition
impl Debug for PhysicalPosition
source§impl From<PhysicalPosition> for Position
impl From<PhysicalPosition> for Position
source§fn from(pos: PhysicalPosition) -> Self
fn from(pos: PhysicalPosition) -> Self
Converts to this type from the input type.
source§impl PartialEq for PhysicalPosition
impl PartialEq for PhysicalPosition
impl StructuralPartialEq for PhysicalPosition
Auto Trait Implementations§
impl Freeze for PhysicalPosition
impl RefUnwindSafe for PhysicalPosition
impl !Send for PhysicalPosition
impl !Sync for PhysicalPosition
impl Unpin for PhysicalPosition
impl UnwindSafe for PhysicalPosition
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
)