#[repr(C)]pub struct IRect {
pub left: i32,
pub top: i32,
pub right: i32,
pub bottom: i32,
}
Fields§
§left: i32
The x coordinate of the rectangle’s left edge.
top: i32
The y coordinate of the rectangle’s top edge.
right: i32
The x coordinate of the rectangle’s right edge.
bottom: i32
The y coordinate of the rectangle’s bottom edge.
Implementations§
Source§impl IRect
impl IRect
pub const fn new(left: i32, top: i32, right: i32, bottom: i32) -> Self
pub const fn new_empty() -> Self
pub fn from_wh(w: i32, h: i32) -> Self
pub fn from_size(size: impl Into<ISize>) -> Self
pub fn from_pt_size(pt: impl Into<IPoint>, size: impl Into<ISize>) -> Self
pub const fn from_ltrb(l: i32, t: i32, r: i32, b: i32) -> Self
pub fn from_xywh(x: i32, y: i32, w: i32, h: i32) -> Self
pub const fn left(&self) -> i32
pub const fn top(&self) -> i32
pub const fn right(&self) -> i32
pub const fn bottom(&self) -> i32
pub const fn x(&self) -> i32
pub const fn y(&self) -> i32
pub const fn width(&self) -> i32
pub const fn height(&self) -> i32
pub const fn size(&self) -> ISize
pub const fn width_64(&self) -> i64
pub const fn height_64(&self) -> i64
pub fn is_empty_64(&self) -> bool
pub fn is_empty(&self) -> bool
pub fn set_empty(&mut self)
pub fn set_ltrb(&mut self, left: i32, top: i32, right: i32, bottom: i32)
pub fn set_xywh(&mut self, x: i32, y: i32, w: i32, h: i32)
pub fn set_wh(&mut self, width: i32, height: i32)
pub fn set_size(&mut self, size: impl Into<ISize>)
pub fn with_offset(&self, delta: impl Into<IVector>) -> Self
pub fn with_inset(&self, delta: impl Into<IVector>) -> Self
pub fn with_outset(&self, delta: impl Into<IVector>) -> Self
pub fn offset(&mut self, delta: impl Into<IPoint>)
pub fn offset_to(&mut self, new_p: impl Into<IPoint>)
pub fn with_offset_to(&self, new_p: impl Into<IPoint>) -> Self
pub fn inset(&mut self, delta: impl Into<IVector>)
pub fn outset(&mut self, delta: impl Into<IVector>)
pub fn with_adjustment(&self, d_l: i32, d_t: i32, d_r: i32, d_b: i32) -> Self
pub fn adjust(&mut self, d_l: i32, d_t: i32, d_r: i32, d_b: i32)
pub fn contains_no_empty_check(&self, r: &Self) -> bool
pub fn intersect(a: &Self, b: &Self) -> Option<Self>
pub fn intersects(a: &Self, b: &Self) -> bool
pub fn intersect_no_empty_check_(a: &Self, b: &Self) -> Option<Self>
pub fn join(a: &Self, b: &Self) -> Self
pub fn sort(&mut self)
pub fn sorted(&self) -> Self
pub fn empty() -> &'static Self
👎Deprecated since 0.27.0: removed without replacement
Trait Implementations§
Source§impl Combine<Handle<SkRegion>, IRect> for Handle<SkRegion>
impl Combine<Handle<SkRegion>, IRect> for Handle<SkRegion>
fn combine(region: &Region, op: RegionOp, rect: &IRect) -> Self
fn difference(a: &A, b: &B) -> Self
fn intersect(a: &A, b: &B) -> Self
fn xor(a: &A, b: &B) -> Self
fn union(a: &A, b: &B) -> Self
fn reverse_difference(a: &A, b: &B) -> Self
fn replace(a: &A, b: &B) -> Self
Source§impl Combine<IRect, Handle<SkRegion>> for Handle<SkRegion>
impl Combine<IRect, Handle<SkRegion>> for Handle<SkRegion>
fn combine(rect: &IRect, op: RegionOp, region: &Region) -> Self
fn difference(a: &A, b: &B) -> Self
fn intersect(a: &A, b: &B) -> Self
fn xor(a: &A, b: &B) -> Self
fn union(a: &A, b: &B) -> Self
fn reverse_difference(a: &A, b: &B) -> Self
fn replace(a: &A, b: &B) -> Self
Source§impl Intersects<IRect> for Region
impl Intersects<IRect> for Region
fn intersects(&self, rect: &IRect) -> bool
Source§impl QuickReject<IRect> for Region
impl QuickReject<IRect> for Region
fn quick_reject(&self, rect: &IRect) -> bool
impl Copy for IRect
impl Eq for IRect
impl StructuralPartialEq for IRect
Auto Trait Implementations§
impl Freeze for IRect
impl RefUnwindSafe for IRect
impl Send for IRect
impl Sync for IRect
impl Unpin for IRect
impl UnwindSafe for IRect
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