Struct makepad_live_compiler::live_eval::Rect
source · pub struct Rect {
pub pos: DVec2,
pub size: DVec2,
}
Fields§
§pos: DVec2
§size: DVec2
Implementations§
source§impl 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
pub fn is_nan(&self) -> bool
Trait Implementations§
source§impl PartialEq<Rect> for Rect
impl PartialEq<Rect> for Rect
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§
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