Struct imageproc::rect::Rect [] [src]

pub struct Rect {
    // some fields omitted
}

A rectangular region of non-zero width and height.

Methods

impl Rect
[src]

fn at(x: i32, y: i32) -> RectPosition

Reduces possibility of confusing coordinates and dimensions when specifying rects.

fn top(&self) -> i32

Smallest y-coordinate reached by rect.

fn left(&self) -> i32

Smallest x-coordinate reached by rect.

fn bottom(&self) -> i32

Greatest y-coordinate reached by rect.

fn right(&self) -> i32

Greatest x-coordinate reached by rect.

fn width(&self) -> u32

Width of rect.

fn height(&self) -> u32

Height of rect.

fn intersect(&self, other: Rect) -> Option<Rect>

Returns the intersection of self and other, or none if they are are disjoint.

Trait Implementations

impl Eq for Rect
[src]

impl PartialEq for Rect
[src]

fn eq(&self, __arg_0: &Rect) -> bool

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, __arg_0: &Rect) -> bool

This method tests for !=.

impl Debug for Rect
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl Clone for Rect
[src]

fn clone(&self) -> Rect

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)
1.0.0

Performs copy-assignment from source. Read more

impl Copy for Rect
[src]

impl Region<i32> for Rect
[src]

fn contains(&self, x: i32, y: i32) -> bool

impl Region<f32> for Rect
[src]

fn contains(&self, x: f32, y: f32) -> bool