Struct mutils::Rect [−][src]
Implementations
impl<N: Num> Rect<N>[src]
pub fn new_from_raw(
bottom_left_x: N,
bottom_left_y: N,
width: N,
height: N
) -> Self[src]
bottom_left_x: N,
bottom_left_y: N,
width: N,
height: N
) -> Self
pub fn new(bottom_left: Point<N>, size: Size<N>) -> Self[src]
pub fn move_xy(&mut self, xy: Point<N>)[src]
pub fn move_x(&mut self, x: N)[src]
pub fn move_y(&mut self, y: N)[src]
pub fn width(&self) -> N[src]
pub fn height(&self) -> N[src]
pub fn area(&self) -> N[src]
pub fn size(&self) -> Size<N>[src]
pub fn bottom_left(&self) -> Point<N>[src]
pub fn top_y(&self) -> N[src]
pub fn bottom_y(&self) -> N[src]
pub fn left_x(&self) -> N[src]
pub fn right_x(&self) -> N[src]
pub fn top_right(&self) -> Point<N>[src]
pub fn centre(&self) -> Point<N>[src]
pub fn set_bottom_left(&mut self, xy: Point<N>)[src]
pub fn set_centre(&mut self, xy: Point<N>)[src]
pub fn overlaps(&self, other: Self) -> bool[src]
pub fn contains(&self, point: Point<N>) -> bool[src]
pub fn intersect(&self, other: Self) -> Option<Self>[src]
pub fn combine(&self, other: Self) -> Self[src]
pub fn get_scale_diff(&self, other: Self) -> Size<N>[src]
impl<N: Num> Rect<N>[src]
pub fn to_clamped<T: Num + FromClamped<N>>(&self) -> Rect<T>[src]
pub fn to<T: Num + From<N>>(&self) -> Rect<T>[src]
Trait Implementations
impl<N: Num> Add<Point<N>> for Rect<N>[src]
type Output = Self
The resulting type after applying the + operator.
fn add(self, other: Point<N>) -> Self[src]
impl<N: Num> Add<Size<N>> for Rect<N>[src]
type Output = Self
The resulting type after applying the + operator.
fn add(self, other: Size<N>) -> Self[src]
impl<N: Num> AddAssign<Point<N>> for Rect<N>[src]
fn add_assign(&mut self, other: Point<N>)[src]
impl<N: Num> AddAssign<Size<N>> for Rect<N>[src]
fn add_assign(&mut self, other: Size<N>)[src]
impl<N: Clone + Num> Clone for Rect<N>[src]
impl<N: Copy + Num> Copy for Rect<N>[src]
impl<N: Debug + Num> Debug for Rect<N>[src]
impl<N: Num> IntoIterator for Rect<N>[src]
type Item = Point<N>
The type of the elements being iterated over.
type IntoIter = RectIter<N>
Which kind of iterator are we turning this into?
fn into_iter(self) -> Self::IntoIter[src]
impl<N: Num> PartialEq<Rect<N>> for Rect<N>[src]
impl<N: Num> Sub<Point<N>> for Rect<N>[src]
type Output = Self
The resulting type after applying the - operator.
fn sub(self, other: Point<N>) -> Self[src]
impl<N: Num> Sub<Size<N>> for Rect<N>[src]
type Output = Self
The resulting type after applying the - operator.
fn sub(self, other: Size<N>) -> Self[src]
impl<N: Num> SubAssign<Point<N>> for Rect<N>[src]
fn sub_assign(&mut self, other: Point<N>)[src]
impl<N: Num> SubAssign<Size<N>> for Rect<N>[src]
fn sub_assign(&mut self, other: Size<N>)[src]
Auto Trait Implementations
impl<N> RefUnwindSafe for Rect<N> where
N: RefUnwindSafe, [src]
N: RefUnwindSafe,
impl<N> Send for Rect<N> where
N: Send, [src]
N: Send,
impl<N> Sync for Rect<N> where
N: Sync, [src]
N: Sync,
impl<N> Unpin for Rect<N> where
N: Unpin, [src]
N: Unpin,
impl<N> UnwindSafe for Rect<N> where
N: UnwindSafe, [src]
N: UnwindSafe,
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>,