pub struct Region<Space> { /* private fields */ }
Expand description
Region type cribbed from Druid.
Implementations§
source§impl<Space> Region<Space>
impl<Space> Region<Space>
sourcepub fn rects(&self) -> &[Rect<f32, Space>]
pub fn rects(&self) -> &[Rect<f32, Space>]
Returns the collection of rectangles making up this region.
sourcepub fn set_rect(&mut self, rect: Rect<f32, Space>)
pub fn set_rect(&mut self, rect: Rect<f32, Space>)
Replaces this region with a single rectangle.
sourcepub fn bounding_box(&self) -> Rect<f32, Space>
pub fn bounding_box(&self) -> Rect<f32, Space>
Returns a rectangle containing this region.
sourcepub fn intersects(&self, rect: Rect<f32, Space>) -> bool
pub fn intersects(&self, rect: Rect<f32, Space>) -> bool
Returns true
if this region has a non-empty intersection with the given rectangle.
sourcepub fn union_with(&mut self, other: &Region<Space>)
pub fn union_with(&mut self, other: &Region<Space>)
Modifies this region by including everything in the other region.