pub struct Box2(pub Box2D<f64, Unit>);Tuple Fields§
§0: Box2D<f64, Unit>Implementations§
Source§impl Box2
impl Box2
pub fn from_min_max(min_x: f64, min_y: f64, max_x: f64, max_y: f64) -> Self
pub fn from_center(x: f64, y: f64, width: f64, height: f64) -> Self
pub fn width(&self) -> f64
pub fn height(&self) -> f64
pub fn min_x(&self) -> f64
pub fn min_y(&self) -> f64
pub fn max_x(&self) -> f64
pub fn max_y(&self) -> f64
pub fn center(&self) -> (f64, f64)
pub fn center_point(&self) -> Point
pub fn union(&mut self, other: Self)
pub fn translate(&mut self, dx: f64, dy: f64)
pub fn pad(&mut self, padding: f64)
pub fn contains_point(&self, x: f64, y: f64) -> bool
Trait Implementations§
impl Copy for Box2
impl StructuralPartialEq for Box2
Auto Trait Implementations§
impl Freeze for Box2
impl RefUnwindSafe for Box2
impl Send for Box2
impl Sync for Box2
impl Unpin for Box2
impl UnsafeUnpin for Box2
impl UnwindSafe for Box2
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