[−][src]Struct egui::math::Rect
Fields
min: Pos2max: Pos2Implementations
impl Rect[src]
pub fn everything() -> Self[src]
Infinite rectangle that contains everything
pub fn nothing() -> Self[src]
pub fn from_min_max(min: Pos2, max: Pos2) -> Self[src]
pub fn from_min_size(min: Pos2, size: Vec2) -> Self[src]
pub fn from_center_size(center: Pos2, size: Vec2) -> Self[src]
#[must_use]pub fn expand(self, amnt: f32) -> Self[src]
Expand by this much in each direction, keeping the center
#[must_use]pub fn expand2(self, amnt: Vec2) -> Self[src]
Expand by this much in each direction, keeping the center
#[must_use]pub fn shrink(self, amnt: f32) -> Self[src]
Shrink by this much in each direction, keeping the center
#[must_use]pub fn shrink2(self, amnt: Vec2) -> Self[src]
Shrink by this much in each direction, keeping the center
#[must_use]pub fn translate(self, amnt: Vec2) -> Self[src]
#[must_use]pub fn intersect(self, other: Rect) -> Self[src]
pub fn set_width(&mut self, w: f32)[src]
keep min
pub fn set_height(&mut self, h: f32)[src]
keep min
pub fn set_center(&mut self, center: Pos2)[src]
Keep size
#[must_use]pub fn contains(&self, p: Pos2) -> bool[src]
pub fn extend_with(&mut self, p: Pos2)[src]
pub fn union(self, other: Rect) -> Rect[src]
pub fn center(&self) -> Pos2[src]
pub fn size(&self) -> Vec2[src]
pub fn width(&self) -> f32[src]
pub fn height(&self) -> f32[src]
pub fn range_x(&self) -> RangeInclusive<f32>[src]
pub fn range_y(&self) -> RangeInclusive<f32>[src]
pub fn is_empty(&self) -> bool[src]
pub fn is_finite(&self) -> bool[src]
pub fn left(&self) -> f32[src]
pub fn right(&self) -> f32[src]
pub fn top(&self) -> f32[src]
pub fn bottom(&self) -> f32[src]
pub fn left_top(&self) -> Pos2[src]
pub fn center_top(&self) -> Pos2[src]
pub fn right_top(&self) -> Pos2[src]
pub fn left_center(&self) -> Pos2[src]
pub fn right_center(&self) -> Pos2[src]
pub fn left_bottom(&self) -> Pos2[src]
pub fn center_bottom(&self) -> Pos2[src]
pub fn right_bottom(&self) -> Pos2[src]
Trait Implementations
impl Clone for Rect[src]
impl Copy for Rect[src]
impl Debug for Rect[src]
impl Default for Rect[src]
impl Eq for Rect[src]
impl PartialEq<Rect> for Rect[src]
impl StructuralEq for Rect[src]
impl StructuralPartialEq for Rect[src]
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
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T[src]
fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,