Struct widgetry::ScreenDims[][src]

pub struct ScreenDims {
    pub width: f64,
    pub height: f64,
}

ScreenDims is in units of logical pixels, as opposed to physical pixels.

Fields

width: f64height: f64

Implementations

impl ScreenDims[src]

pub fn new(width: f64, height: f64) -> ScreenDims[src]

pub fn square(square: f64) -> Self[src]

pub fn pad(&self, edge_insets: EdgeInsets) -> Self[src]

pub fn top_left_for_corner(&self, corner: ScreenPt, canvas: &Canvas) -> ScreenPt[src]

Trait Implementations

impl Clone for ScreenDims[src]

impl Copy for ScreenDims[src]

impl Debug for ScreenDims[src]

impl<'de> Deserialize<'de> for ScreenDims[src]

impl From<(f64, f64)> for ScreenDims[src]

(Width, Height) -> ScreenDims

impl From<LogicalSize<f64>> for ScreenDims[src]

impl From<ScreenDims> for LogicalSize<f64>[src]

impl From<ScreenDims> for Size<Dimension>[src]

impl From<f64> for ScreenDims[src]

impl PartialEq<ScreenDims> for ScreenDims[src]

impl Serialize for ScreenDims[src]

impl StructuralPartialEq for ScreenDims[src]

Auto Trait Implementations

impl RefUnwindSafe for ScreenDims

impl Send for ScreenDims

impl Sync for ScreenDims

impl Unpin for ScreenDims

impl UnwindSafe for ScreenDims

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> Downcast for T where
    T: Any

impl<T> DowncastSync for T where
    T: Any + Send + Sync

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.