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.
Trait Implementations§
Auto Trait Implementations§
impl<Space> RefUnwindSafe for Region<Space>where Space: RefUnwindSafe,
impl<Space> Send for Region<Space>where Space: Send,
impl<Space> Sync for Region<Space>where Space: Sync,
impl<Space> Unpin for Region<Space>where Space: Unpin,
impl<Space> UnwindSafe for Region<Space>where Space: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more