#[repr(transparent)]pub struct Rect { /* private fields */ }
Implementations
sourceimpl Rect
impl Rect
pub fn contains_point(&self, p: &Point) -> bool
pub fn contains_rect(&self, b: &Rect) -> bool
pub fn expand(&self, p: &Point) -> Rect
pub fn area(&self) -> f32
pub fn bottom_left(&self) -> Point
pub fn bottom_right(&self) -> Point
pub fn center(&self) -> Point
pub fn height(&self) -> f32
pub fn top_left(&self) -> Point
pub fn top_right(&self) -> Point
pub fn width(&self) -> f32
pub fn x(&self) -> f32
pub fn y(&self) -> f32
pub fn inset(&mut self, d_x: f32, d_y: f32)
pub fn inset_r(&self, d_x: f32, d_y: f32) -> Rect
pub fn interpolate(&self, b: &Rect, factor: f64) -> Rect
pub fn intersection(&self, b: &Rect) -> Option<Rect>
pub fn normalize(&mut self)
pub fn normalize_r(&self) -> Rect
pub fn offset(&mut self, d_x: f32, d_y: f32)
pub fn offset_r(&self, d_x: f32, d_y: f32) -> Rect
pub fn round_extents(&self) -> Rect
pub fn scale(&self, s_h: f32, s_v: f32) -> Rect
pub fn union(&self, b: &Rect) -> Rect
pub fn zero() -> Rect
Trait Implementations
sourceimpl PartialEq<Rect> for Rect
impl PartialEq<Rect> for Rect
sourceimpl StaticType for Rect
impl StaticType for Rect
sourcefn static_type() -> Type
fn static_type() -> Type
Returns the type identifier of Self
.
impl Copy for Rect
impl Eq 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
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> StaticTypeExt for T where
T: StaticType,
impl<T> StaticTypeExt for T where
T: StaticType,
sourcefn ensure_type()
fn ensure_type()
Ensures that the type has been registered with the type system.
sourceimpl<T> ToClosureReturnValue for T where
T: ToValue,
impl<T> ToClosureReturnValue for T where
T: ToValue,
fn to_closure_return_value(&self) -> Option<Value>
sourceimpl<T> ToSendValue for T where
T: Send + ToValue + ?Sized,
impl<T> ToSendValue for T where
T: Send + ToValue + ?Sized,
sourcefn to_send_value(&self) -> SendValue
fn to_send_value(&self) -> SendValue
Returns a SendValue
clone of self
.