Struct suzy::dims::FixedSizeRect [−][src]
A rectangular region which will ignore changes to size
Implementations
impl FixedSizeRect
[src]
pub fn new(x: Dim, y: Dim) -> Self
[src]
Create a new FixedSizeRect with the specified dimensions.
pub fn default_pos(width: f32, height: f32) -> Self
[src]
Create a new FixedSizeRect with the specified size, positioned at the bottom left.
Trait Implementations
impl Clone for FixedSizeRect
[src]
fn clone(&self) -> FixedSizeRect
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for FixedSizeRect
[src]
impl From<SimpleRect> for FixedSizeRect
[src]
fn from(rect: SimpleRect) -> Self
[src]
impl<'a> Rect for FixedSizeRect
[src]
fn x(&self) -> Dim
[src]
fn y(&self) -> Dim
[src]
fn x_mut<F, R>(&mut self, f: F) -> R where
F: FnOnce(&mut Dim) -> R,
[src]
F: FnOnce(&mut Dim) -> R,
fn y_mut<F, R>(&mut self, f: F) -> R where
F: FnOnce(&mut Dim) -> R,
[src]
F: FnOnce(&mut Dim) -> R,
fn left(&self) -> f32
[src]
fn set_left(&mut self, value: f32)
[src]
fn right(&self) -> f32
[src]
fn set_right(&mut self, value: f32)
[src]
fn bottom(&self) -> f32
[src]
fn set_bottom(&mut self, value: f32)
[src]
fn top(&self) -> f32
[src]
fn set_top(&mut self, value: f32)
[src]
fn center_x(&self) -> f32
[src]
fn set_center_x(&mut self, value: f32)
[src]
fn center_y(&self) -> f32
[src]
fn set_center_y(&mut self, value: f32)
[src]
fn center(&self) -> (f32, f32)
[src]
fn set_center(&mut self, value: (f32, f32))
[src]
fn width(&self) -> f32
[src]
fn set_width(&mut self, value: f32)
[src]
fn height(&self) -> f32
[src]
fn set_height(&mut self, value: f32)
[src]
fn pivot(&self) -> (f32, f32)
[src]
fn set_pivot(&mut self, value: (f32, f32))
[src]
fn pivot_pos(&self) -> (f32, f32)
[src]
fn set_pivot_pos(&mut self, value: (f32, f32))
[src]
fn area(&self) -> f32
[src]
fn aspect(&self) -> f32
[src]
fn contains(&self, point: (f32, f32)) -> bool
[src]
fn set_fill_width<R: ?Sized>(&mut self, other: &R, padding: Padding) where
R: Rect,
[src]
R: Rect,
fn set_fill_height<R: ?Sized>(&mut self, other: &R, padding: Padding) where
R: Rect,
[src]
R: Rect,
fn set_fill<R: ?Sized, P: ?Sized>(&mut self, other: &R, padding: &P) where
R: Rect,
P: Padding2d,
[src]
R: Rect,
P: Padding2d,
fn shrink_to_aspect(&mut self, aspect: f32)
[src]
fn grow_to_aspect(&mut self, aspect: f32)
[src]
fn surrounds<R: Rect + ?Sized>(&self, other: &R) -> bool
[src]
fn overlaps<R: Rect + ?Sized>(&self, other: &R) -> bool
[src]
Auto Trait Implementations
impl RefUnwindSafe for FixedSizeRect
impl Send for FixedSizeRect
impl Sync for FixedSizeRect
impl Unpin for FixedSizeRect
impl UnwindSafe for FixedSizeRect
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> DynRect for T where
T: Rect,
[src]
T: Rect,
pub fn x(&Self) -> Dim
[src]
pub fn y(&Self) -> Dim
[src]
pub fn x_mut(&mut Self, Box<dyn FnOnce(&mut Dim) + 'a, Global>)
[src]
pub fn y_mut(&mut Self, Box<dyn FnOnce(&mut Dim) + 'a, Global>)
[src]
pub fn set_left(&mut Self, f32)
[src]
pub fn set_right(&mut Self, f32)
[src]
pub fn set_bottom(&mut Self, f32)
[src]
pub fn set_top(&mut Self, f32)
[src]
pub fn set_center_x(&mut Self, f32)
[src]
pub fn set_center_y(&mut Self, f32)
[src]
pub fn set_center(&mut Self, (f32, f32))
[src]
pub fn set_width(&mut Self, f32)
[src]
pub fn set_height(&mut Self, f32)
[src]
pub fn set_pivot(&mut Self, (f32, f32))
[src]
pub fn set_pivot_pos(&mut Self, (f32, f32))
[src]
pub fn shrink_to_aspect(&mut Self, f32)
[src]
pub fn grow_to_aspect(&mut Self, f32)
[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>,