[][src]Struct widgetry::ScreenDims

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<LogicalSize<f64>> for ScreenDims[src]

impl From<ScreenDims> for LogicalSize<f64>[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[src]

impl Send for ScreenDims[src]

impl Sync for ScreenDims[src]

impl Unpin for ScreenDims[src]

impl UnwindSafe for ScreenDims[src]

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: Send + Sync + Any

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.