[−][src]Struct show_image::Rectangle
A rectangle.
Methods
impl Rectangle
[src]
pub fn from_xywh(x: i32, y: i32, width: u32, height: u32) -> Self
[src]
Create a rectangle from X, Y coordinates and the width and height.
pub fn x(&self) -> i32
[src]
Get the X location of the rectangle.
pub fn y(&self) -> i32
[src]
Get the Y location of the rectangle.
pub fn width(&self) -> u32
[src]
Get the width of the rectangle.
pub fn height(&self) -> u32
[src]
Get the height of the rectangle.
Trait Implementations
impl Clone for Rectangle
[src]
impl Debug for Rectangle
[src]
impl Eq for Rectangle
[src]
impl<'a> From<&'a Rect> for Rectangle
[src]
impl<'a> From<&'a Rectangle> for Rect
[src]
impl From<Rect> for Rectangle
[src]
impl From<Rectangle> for Rect
[src]
impl Ord for Rectangle
[src]
fn cmp(&self, other: &Rectangle) -> Ordering
[src]
#[must_use]
fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]
fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]
fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<Rectangle> for Rectangle
[src]
impl PartialOrd<Rectangle> for Rectangle
[src]
fn partial_cmp(&self, other: &Rectangle) -> Option<Ordering>
[src]
fn lt(&self, other: &Rectangle) -> bool
[src]
fn le(&self, other: &Rectangle) -> bool
[src]
fn gt(&self, other: &Rectangle) -> bool
[src]
fn ge(&self, other: &Rectangle) -> bool
[src]
impl StructuralEq for Rectangle
[src]
impl StructuralPartialEq for Rectangle
[src]
Auto Trait Implementations
impl RefUnwindSafe for Rectangle
impl Send for Rectangle
impl Sync for Rectangle
impl Unpin for Rectangle
impl UnwindSafe for Rectangle
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,
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> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
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.
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>,