skia_safe

Struct IRect

Source
#[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

Source

pub const fn new(left: i32, top: i32, right: i32, bottom: i32) -> Self

Source

pub const fn new_empty() -> Self

Source

pub fn from_wh(w: i32, h: i32) -> Self

Source

pub fn from_size(size: impl Into<ISize>) -> Self

Source

pub fn from_pt_size(pt: impl Into<IPoint>, size: impl Into<ISize>) -> Self

Source

pub const fn from_ltrb(l: i32, t: i32, r: i32, b: i32) -> Self

Source

pub fn from_xywh(x: i32, y: i32, w: i32, h: i32) -> Self

Source

pub const fn left(&self) -> i32

Source

pub const fn top(&self) -> i32

Source

pub const fn right(&self) -> i32

Source

pub const fn bottom(&self) -> i32

Source

pub const fn x(&self) -> i32

Source

pub const fn y(&self) -> i32

Source

pub const fn width(&self) -> i32

Source

pub const fn height(&self) -> i32

Source

pub const fn size(&self) -> ISize

Source

pub const fn width_64(&self) -> i64

Source

pub const fn height_64(&self) -> i64

Source

pub fn is_empty_64(&self) -> bool

Source

pub fn is_empty(&self) -> bool

Source

pub fn set_empty(&mut self)

Source

pub fn set_ltrb(&mut self, left: i32, top: i32, right: i32, bottom: i32)

Source

pub fn set_xywh(&mut self, x: i32, y: i32, w: i32, h: i32)

Source

pub fn set_wh(&mut self, width: i32, height: i32)

Source

pub fn set_size(&mut self, size: impl Into<ISize>)

Source

pub fn with_offset(&self, delta: impl Into<IVector>) -> Self

Source

pub fn with_inset(&self, delta: impl Into<IVector>) -> Self

Source

pub fn with_outset(&self, delta: impl Into<IVector>) -> Self

Source

pub fn offset(&mut self, delta: impl Into<IPoint>)

Source

pub fn offset_to(&mut self, new_p: impl Into<IPoint>)

Source

pub fn with_offset_to(&self, new_p: impl Into<IPoint>) -> Self

Source

pub fn inset(&mut self, delta: impl Into<IVector>)

Source

pub fn outset(&mut self, delta: impl Into<IVector>)

Source

pub fn with_adjustment(&self, d_l: i32, d_t: i32, d_r: i32, d_b: i32) -> Self

Source

pub fn adjust(&mut self, d_l: i32, d_t: i32, d_r: i32, d_b: i32)

Source

pub fn contains_no_empty_check(&self, r: &Self) -> bool

Source

pub fn intersect(a: &Self, b: &Self) -> Option<Self>

Source

pub fn intersects(a: &Self, b: &Self) -> bool

Source

pub fn intersect_no_empty_check_(a: &Self, b: &Self) -> Option<Self>

Source

pub fn join(a: &Self, b: &Self) -> Self

Source

pub fn sort(&mut self)

Source

pub fn sorted(&self) -> Self

Source

pub fn empty() -> &'static Self

👎Deprecated since 0.27.0: removed without replacement

Trait Implementations§

Source§

impl AsRef<IRect> for IRect

Source§

fn as_ref(&self) -> &IRect

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl Clone for IRect

Source§

fn clone(&self) -> IRect

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Combine<Handle<SkRegion>, IRect> for Handle<SkRegion>

Source§

fn combine(region: &Region, op: RegionOp, rect: &IRect) -> Self

Source§

fn difference(a: &A, b: &B) -> Self

Source§

fn intersect(a: &A, b: &B) -> Self

Source§

fn xor(a: &A, b: &B) -> Self

Source§

fn union(a: &A, b: &B) -> Self

Source§

fn reverse_difference(a: &A, b: &B) -> Self

Source§

fn replace(a: &A, b: &B) -> Self

Source§

impl Combine<IRect, Handle<SkRegion>> for Handle<SkRegion>

Source§

fn combine(rect: &IRect, op: RegionOp, region: &Region) -> Self

Source§

fn difference(a: &A, b: &B) -> Self

Source§

fn intersect(a: &A, b: &B) -> Self

Source§

fn xor(a: &A, b: &B) -> Self

Source§

fn union(a: &A, b: &B) -> Self

Source§

fn reverse_difference(a: &A, b: &B) -> Self

Source§

fn replace(a: &A, b: &B) -> Self

Source§

impl Contains<&IRect> for Region

Source§

fn contains(&self, rect: &IRect) -> bool

Source§

impl Contains<&IRect> for IRect

Source§

fn contains(&self, r: &IRect) -> bool

Source§

impl Contains<&IRect> for Rect

Source§

fn contains(&self, r: &IRect) -> bool

Source§

impl Contains<&Rect> for IRect

Source§

fn contains(&self, other: &Rect) -> bool

Source§

impl Contains<IPoint> for IRect

Source§

fn contains(&self, other: IPoint) -> bool

Source§

impl Contains<IRect> for IRect

Source§

fn contains(&self, other: IRect) -> bool

Source§

impl Contains<IRect> for Rect

Source§

fn contains(&self, r: IRect) -> bool

Source§

impl Contains<Rect> for IRect

Source§

fn contains(&self, other: Rect) -> bool

Source§

impl Debug for IRect

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for IRect

Source§

fn default() -> IRect

Returns the “default value” for a type. Read more
Source§

impl From<&IRect> for CropRect

Source§

fn from(r: &IRect) -> Self

Converts to this type from the input type.
Source§

impl From<(IPoint, ISize)> for IRect

Source§

fn from((point, size): (IPoint, ISize)) -> Self

Converts to this type from the input type.
Source§

impl From<IRect> for CropRect

Source§

fn from(r: IRect) -> Self

Converts to this type from the input type.
Source§

impl From<IRect> for Rect

Source§

fn from(irect: IRect) -> Self

Converts to this type from the input type.
Source§

impl Intersects<IRect> for Region

Source§

fn intersects(&self, rect: &IRect) -> bool

Source§

impl PartialEq for IRect

Source§

fn eq(&self, other: &IRect) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl QuickReject<IRect> for Region

Source§

fn quick_reject(&self, rect: &IRect) -> bool

Source§

impl RoundOut<IRect> for Rect

Source§

impl Copy for IRect

Source§

impl Eq for IRect

Source§

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<N, T> NativeTransmutableWrapper<N> for T
where T: NativeTransmutable<N>,

Source§

fn wrap(native: N) -> T

Source§

fn unwrap(self) -> N

Source§

fn inner(&self) -> &N

Source§

fn inner_mut(&mut self) -> &mut N

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.