Fields
pos: DVec2
size: DVec2
Implementations
sourceimpl Rect
impl Rect
pub fn translate(self, pos: DVec2) -> Rect
pub fn contains(&self, pos: DVec2) -> bool
pub fn center(&self) -> DVec2
pub fn scale_and_shift(&self, center: DVec2, scale: f64, shift: DVec2) -> Rect
pub fn intersects(&self, r: Rect) -> bool
pub fn add_margin(self, size: DVec2) -> Rect
pub fn contain(&self, other: Rect) -> Rect
pub fn clip(&self, clip: (DVec2, DVec2)) -> Rect
pub fn from_lerp(a: Rect, b: Rect, f: f64) -> Rect
pub fn dpi_snap(&self, f: f64) -> Rect
Trait Implementations
impl Copy for Rect
impl StructuralPartialEq 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 Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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