[][src]Struct openpol::image13h::Rect

pub struct Rect {
    pub left: usize,
    pub top: usize,
    pub width: usize,
    pub height: usize,
}

Fields

left: usize

The position of the left border, inclusive.

top: usize

The position of the top border, inclusive.

width: usize

The width of the rect.

height: usize

The height of the rect.

Methods

impl Rect[src]

pub fn from_ranges(x: Range<usize>, y: Range<usize>) -> Rect[src]

Construct a new Rect from coordinate ranges (exclusively-ended).

pub fn right_inclusive(&self) -> usize[src]

Get the right-most x coordinate that's still in the rect.

pub fn beyond_right(&self) -> usize[src]

Get the x coordinate that's one to the right of the right border of the rect.

pub fn bottom_inclusive(&self) -> usize[src]

Get the bottom-most y coordinate that's still in the rect.

pub fn beyond_bottom(&self) -> usize[src]

Get the y coordinate that's one below the bottom border of the rect.

Trait Implementations

impl Debug for Rect[src]

Auto Trait Implementations

impl RefUnwindSafe for Rect

impl Send for Rect

impl Sync for Rect

impl Unpin for Rect

impl UnwindSafe for Rect

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, 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.