pub struct PhysicalSize {
pub width: f64,
pub height: f64,
}
Expand description
A size represented in physical pixels.
Fields§
§width: f64
§height: f64
Implementations§
Source§impl PhysicalSize
impl PhysicalSize
pub fn new(width: f64, height: f64) -> Self
pub fn from_logical<T: Into<LogicalSize>>(logical: T, scale_factor: f64) -> Self
pub fn to_logical(self, scale_factor: f64) -> LogicalSize
Trait Implementations§
Source§impl Clone for PhysicalSize
impl Clone for PhysicalSize
Source§fn clone(&self) -> PhysicalSize
fn clone(&self) -> PhysicalSize
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 PhysicalSize
impl Debug for PhysicalSize
Source§impl PartialEq for PhysicalSize
impl PartialEq for PhysicalSize
impl Copy for PhysicalSize
impl StructuralPartialEq for PhysicalSize
Auto Trait Implementations§
impl Freeze for PhysicalSize
impl RefUnwindSafe for PhysicalSize
impl Send for PhysicalSize
impl Sync for PhysicalSize
impl Unpin for PhysicalSize
impl UnwindSafe for PhysicalSize
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