Struct pathfinder_geometry::rect::RectI
source · pub struct RectI(pub I32x4);
Expand description
NB: The origin is inclusive, while the lower right point is exclusive.
Tuple Fields§
§0: I32x4
Implementations§
source§impl RectI
impl RectI
pub fn new(origin: Vector2I, size: Vector2I) -> RectI
pub fn from_points(origin: Vector2I, lower_right: Vector2I) -> RectI
pub fn origin(&self) -> Vector2I
pub fn size(&self) -> Vector2I
pub fn origin_x(self) -> i32
pub fn origin_y(self) -> i32
pub fn width(self) -> i32
pub fn height(self) -> i32
pub fn upper_right(&self) -> Vector2I
pub fn lower_left(&self) -> Vector2I
pub fn lower_right(&self) -> Vector2I
pub fn scale(self, factor: i32) -> RectI
pub fn scale_xy(self, factors: Vector2I) -> RectI
pub fn min_x(self) -> i32
pub fn min_y(self) -> i32
pub fn max_x(self) -> i32
pub fn max_y(self) -> i32
pub fn intersects(self, other: RectI) -> bool
pub fn intersection(self, other: RectI) -> Option<RectI>
pub fn contains_point(&self, point: Vector2I) -> bool
pub fn contract(self, amount: Vector2I) -> RectI
pub fn to_f32(&self) -> RectF
Trait Implementations§
source§impl PartialEq for RectI
impl PartialEq for RectI
impl Copy for RectI
impl StructuralPartialEq for RectI
Auto Trait Implementations§
impl Freeze for RectI
impl RefUnwindSafe for RectI
impl Send for RectI
impl Sync for RectI
impl Unpin for RectI
impl UnwindSafe for RectI
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