Struct suzy::dims::SimplePadding2d [−][src]
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]
fn clone(&self) -> SimplePadding2d
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for SimplePadding2d
[src]
impl Debug for SimplePadding2d
[src]
impl Default for SimplePadding2d
[src]
fn default() -> SimplePadding2d
[src]
impl<P: Padding2d> From<&'_ P> for SimplePadding2d
[src]
impl Padding2d for SimplePadding2d
[src]
fn x(&self) -> Padding
[src]
fn y(&self) -> Padding
[src]
fn x_mut(&mut self) -> &mut Padding
[src]
fn y_mut(&mut self) -> &mut Padding
[src]
fn top(&self) -> f32
[src]
fn set_top(&mut self, amount: f32)
[src]
fn right(&self) -> f32
[src]
fn set_right(&mut self, amount: f32)
[src]
fn bottom(&self) -> f32
[src]
fn set_bottom(&mut self, amount: f32)
[src]
fn left(&self) -> f32
[src]
fn set_left(&mut self, amount: f32)
[src]
impl PartialEq<SimplePadding2d> for SimplePadding2d
[src]
fn eq(&self, other: &SimplePadding2d) -> bool
[src]
fn ne(&self, other: &SimplePadding2d) -> bool
[src]
impl StructuralPartialEq for SimplePadding2d
[src]
Auto Trait Implementations
impl RefUnwindSafe for SimplePadding2d
impl Send for SimplePadding2d
impl Sync for SimplePadding2d
impl Unpin for SimplePadding2d
impl UnwindSafe for SimplePadding2d
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>,