Struct vizia_core::vg::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

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 AsRef<IRect> for IRect

§

fn as_ref(&self) -> &IRect

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

impl Clone for IRect

§

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
§

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>

§

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 Contains<&IRect> for Handle<SkRegion>

§

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

§

impl Contains<&IRect> for IRect

§

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

§

impl Contains<&IRect> for Rect

§

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

§

impl Contains<&Rect> for IRect

§

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

§

impl Contains<IPoint> for IRect

§

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

§

impl Contains<IRect> for IRect

§

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

§

impl Contains<IRect> for Rect

§

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

§

impl Contains<Rect> for IRect

§

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

§

impl Debug for IRect

§

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

Formats the value using the given formatter. Read more
§

impl Default for IRect

§

fn default() -> IRect

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

impl From<&IRect> for CropRect

§

fn from(r: &IRect) -> CropRect

Converts to this type from the input type.
§

impl From<(IPoint, ISize)> for IRect

§

fn from(_: (IPoint, ISize)) -> IRect

Converts to this type from the input type.
§

impl From<IRect> for CropRect

§

fn from(r: IRect) -> CropRect

Converts to this type from the input type.
§

impl From<IRect> for Rect

§

fn from(irect: IRect) -> Rect

Converts to this type from the input type.
§

impl Intersects<IRect> for Handle<SkRegion>

§

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

§

impl PartialEq for IRect

§

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.
§

impl QuickReject<IRect> for Handle<SkRegion>

§

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

§

impl RoundOut<IRect> for Rect

§

fn round_out(&self) -> IRect

§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> AnyEq for T
where T: Any + PartialEq,

§

fn equals(&self, other: &(dyn Any + 'static)) -> bool

§

fn as_any(&self) -> &(dyn Any + 'static)

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 T)

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

impl<T> Downcast for T
where T: 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>

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)

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)

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
where T: Any + Send + Sync,

§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send>

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

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
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

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
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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.

§

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

§

fn wrap(native: N) -> T

§

fn unwrap(self) -> N

§

fn inner(&self) -> &N

§

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

source§

impl<T> Same for T

source§

type Output = T

Should always be Self
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.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more