Struct rust_faces::Rect
source · pub struct Rect {
pub x: f32,
pub y: f32,
pub width: f32,
pub height: f32,
}Fields§
§x: f32§y: f32§width: f32§height: f32Implementations§
source§impl Rect
impl Rect
pub fn at(x: f32, y: f32) -> RectPosition
pub fn right(&self) -> f32
pub fn bottom(&self) -> f32
pub fn union(&self, other: &Rect) -> Rect
pub fn intersection(&self, other: &Rect) -> Rect
pub fn iou(&self, other: &Rect) -> f32
pub fn scale2d(&self, x_scale: f32, y_scale: f32) -> Rect
pub fn to_xywh(&self) -> (f32, f32, f32, f32)
Trait Implementations§
impl Copy for Rect
Auto Trait Implementations§
impl RefUnwindSafe for Rect
impl Send for Rect
impl Sync for Rect
impl Unpin for Rect
impl UnwindSafe for Rect
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