Trait graphics_shapes::contains::ContainsShape
source · pub trait ContainsShape {
// Provided methods
fn contains_rect(&self, rect: &Rect) -> bool
where Self: Shape + Sized { ... }
fn contains_circle(&self, circle: &Circle) -> bool
where Self: Shape + Sized { ... }
fn contains_line(&self, line: &Line) -> bool
where Self: Shape + Sized { ... }
fn contains_triangle(&self, triangle: &Triangle) -> bool
where Self: Shape + Sized { ... }
fn contains_ellipse(&self, ellipse: &Ellipse) -> bool
where Self: Shape + Sized { ... }
fn contains_polygon(&self, polygon: &Polygon) -> bool
where Self: Shape + Sized { ... }
}
Expand description
A shape counts as contained if it is fully inside
Provided Methods§
sourcefn contains_rect(&self, rect: &Rect) -> bool
fn contains_rect(&self, rect: &Rect) -> bool
Returns true if self
contains rect
sourcefn contains_circle(&self, circle: &Circle) -> bool
fn contains_circle(&self, circle: &Circle) -> bool
Returns true if self
contains circle
sourcefn contains_line(&self, line: &Line) -> bool
fn contains_line(&self, line: &Line) -> bool
Returns true if self
contains line
sourcefn contains_triangle(&self, triangle: &Triangle) -> bool
fn contains_triangle(&self, triangle: &Triangle) -> bool
Returns true if self
contains triangle
sourcefn contains_ellipse(&self, ellipse: &Ellipse) -> bool
fn contains_ellipse(&self, ellipse: &Ellipse) -> bool
Returns true if self
contains ellipse