Struct riddle_platform_common::LogicalSize [−][src]
A 2d size in logical screen units.
Logical units may be different to screen units depending on dpi scaling
Fields
width: u32
height: u32
Implementations
impl LogicalSize
[src]
pub fn into_physical<W: WindowCommon>(self, window: &W) -> (u32, u32)
[src]
Convert the size from logical units to physical pixel units, with respect to a specific window’s current scaling.
Example
// Given a window with DPI scaling factor of 2: let size = LogicalSize{ width: 10, height: 10 }; assert_eq!((20, 20), size.into_physical(&window));
Trait Implementations
impl Clone for LogicalSize
[src]
fn clone(&self) -> LogicalSize
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for LogicalSize
[src]
impl Debug for LogicalSize
[src]
impl Eq for LogicalSize
[src]
impl From<LogicalSize> for LogicalVec2
[src]
fn from(size: LogicalSize) -> Self
[src]
impl From<LogicalVec2> for LogicalSize
[src]
fn from(vec2: LogicalVec2) -> Self
[src]
impl From<Vector2<u32>> for LogicalSize
[src]
impl PartialEq<LogicalSize> for LogicalSize
[src]
fn eq(&self, other: &LogicalSize) -> bool
[src]
fn ne(&self, other: &LogicalSize) -> bool
[src]
impl StructuralEq for LogicalSize
[src]
impl StructuralPartialEq for LogicalSize
[src]
Auto Trait Implementations
impl RefUnwindSafe for LogicalSize
impl Send for LogicalSize
impl Sync for LogicalSize
impl Unpin for LogicalSize
impl UnwindSafe for LogicalSize
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,