pub struct BBox { /* private fields */ }
Expand description
A bounding box calculator.
Implementations§
source§impl BBox
impl BBox
sourcepub fn is_default(&self) -> bool
pub fn is_default(&self) -> bool
Checks if the bounding box is default, i.e. invalid.
sourcepub fn expand(&self, r: impl Into<Self>) -> Self
pub fn expand(&self, r: impl Into<Self>) -> Self
Expand the bounding box to the specified bounds.
sourcepub fn to_non_zero_rect(&self) -> Option<NonZeroRect>
pub fn to_non_zero_rect(&self) -> Option<NonZeroRect>
Converts a bounding box into NonZeroRect
.
Trait Implementations§
source§impl From<NonZeroRect> for BBox
impl From<NonZeroRect> for BBox
source§fn from(r: NonZeroRect) -> Self
fn from(r: NonZeroRect) -> Self
Converts to this type from the input type.
impl Copy for BBox
Auto Trait Implementations§
impl RefUnwindSafe for BBox
impl Send for BBox
impl Sync for BBox
impl Unpin for BBox
impl UnwindSafe for BBox
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