pub struct Region<Space> { /* private fields */ }
Expand description
Region type cribbed from Druid.
Implementations
sourceimpl<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
sourceimpl<Space> AddAssign<Vector2D<f32, Space>> for Region<Space>
impl<Space> AddAssign<Vector2D<f32, Space>> for Region<Space>
sourcefn add_assign(&mut self, rhs: Vector2D<f32, Space>)
fn add_assign(&mut self, rhs: Vector2D<f32, Space>)
Performs the +=
operation. Read more
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more