Struct suzy::dims::SimplePadding2d[][src]

pub struct SimplePadding2d { /* fields omitted */ }

Representation of two dimensions of padding

Implementations

impl SimplePadding2d[src]

pub fn new(top: f32, right: f32, bottom: f32, left: f32) -> Self[src]

Create a new 2D padding with the specified values.

pub fn zero() -> Self[src]

Create a new 2D padding with zero amount

pub fn uniform(value: f32) -> Self[src]

Create a new 2D padding with the same amount on all edges

pub fn pillarbox(value: f32) -> Self[src]

Create a new 2D padding with the same amount on left and right, and zero on top and bottom

pub fn letterbox(value: f32) -> Self[src]

Create a new 2D padding with the same amount on top and bottom, and zero on left and right

pub fn windowbox(y: f32, x: f32) -> Self[src]

Create a new 2D padding with the same amount on top as on bottom, and the same amount on left as on right

Trait Implementations

impl Clone for SimplePadding2d[src]

impl Copy for SimplePadding2d[src]

impl Debug for SimplePadding2d[src]

impl Default for SimplePadding2d[src]

impl<P: Padding2d> From<&'_ P> for SimplePadding2d[src]

impl Padding2d for SimplePadding2d[src]

impl PartialEq<SimplePadding2d> for SimplePadding2d[src]

impl StructuralPartialEq for SimplePadding2d[src]

Auto Trait Implementations

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> From<T> for T[src]

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

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.