Struct crayon::utils::Rect
[−]
[src]
pub struct Rect { pub min: Point2<i32>, pub max: Point2<i32>, }
A rectangle, with top-left corner at min
, and bottom-right corner at max
.
Fields
min: Point2<i32>
max: Point2<i32>
Methods
impl Rect
[src]
fn new(min: Point2<i32>, max: Point2<i32>) -> Self
[src]
fn width(&self) -> i32
[src]
fn height(&self) -> i32
[src]
fn size(&self) -> i32
[src]
fn overlap(&self, rhs: Self) -> Self
[src]
fn contains<P>(&self, p: P) -> bool where
P: Into<Point2<i32>>,
[src]
P: Into<Point2<i32>>,
Trait Implementations
impl Copy for Rect
[src]
impl Clone for Rect
[src]
fn clone(&self) -> Rect
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more