Struct IRect
#[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§
§impl IRect
impl IRect
pub const fn new(left: i32, top: i32, right: i32, bottom: i32) -> IRect
pub const fn new_empty() -> IRect
pub fn from_wh(w: i32, h: i32) -> IRect
pub fn from_size(size: impl Into<ISize>) -> IRect
pub fn from_pt_size(pt: impl Into<IPoint>, size: impl Into<ISize>) -> IRect
pub const fn from_ltrb(l: i32, t: i32, r: i32, b: i32) -> IRect
pub fn from_xywh(x: i32, y: i32, w: i32, h: i32) -> IRect
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<IPoint>) -> IRect
pub fn with_inset(&self, delta: impl Into<IPoint>) -> IRect
pub fn with_outset(&self, delta: impl Into<IPoint>) -> IRect
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>) -> IRect
pub fn inset(&mut self, delta: impl Into<IPoint>)
pub fn outset(&mut self, delta: impl Into<IPoint>)
pub fn with_adjustment(&self, d_l: i32, d_t: i32, d_r: i32, d_b: i32) -> IRect
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: &IRect) -> bool
pub fn intersect(a: &IRect, b: &IRect) -> Option<IRect>
pub fn intersects(a: &IRect, b: &IRect) -> bool
pub fn intersect_no_empty_check_(a: &IRect, b: &IRect) -> Option<IRect>
pub fn join(a: &IRect, b: &IRect) -> IRect
pub fn sort(&mut self)
pub fn sorted(&self) -> IRect
pub fn empty() -> &'static IRect
👎Deprecated since 0.27.0: removed without replacement
Trait Implementations§
§impl Combine<Handle<SkRegion>, IRect> for Handle<SkRegion>
impl Combine<Handle<SkRegion>, IRect> for Handle<SkRegion>
fn combine( region: &Handle<SkRegion>, op: SkRegion_Op, rect: &IRect, ) -> Handle<SkRegion>
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
§impl Combine<IRect, Handle<SkRegion>> for Handle<SkRegion>
impl Combine<IRect, Handle<SkRegion>> for Handle<SkRegion>
fn combine( rect: &IRect, op: SkRegion_Op, region: &Handle<SkRegion>, ) -> Handle<SkRegion>
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
§impl Intersects<IRect> for Handle<SkRegion>
impl Intersects<IRect> for Handle<SkRegion>
fn intersects(&self, rect: &IRect) -> bool
§impl QuickReject<IRect> for Handle<SkRegion>
impl QuickReject<IRect> for Handle<SkRegion>
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§
§impl<T> AnyEq for T
impl<T> AnyEq for T
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.