Skip to main content

VnClipNode

Struct VnClipNode 

Source
pub struct VnClipNode {
    pub geometry: Arc<VnClipGeometry>,
    pub color_matrix: Option<VnColorMatrix>,
    pub capture: Option<VnCaptureInfo>,
    pub mask: Option<VnClipMask>,
    pub parent: Option<Arc<VnClipNode>>,
}
Expand description

vue-native fork: a clip shape in force, and the ones around it — what a hitbox, a deferred draw and the window’s clip stack carry, so a press outside any of them misses (CSS Masking 1 §5).

Fields§

§geometry: Arc<VnClipGeometry>

This clip’s shape, in window device pixels.

§color_matrix: Option<VnColorMatrix>

A color transform applied when this isolated layer is composited.

§capture: Option<VnCaptureInfo>

A captured group (crate::VnIsolation::capture); it has no parent.

§mask: Option<VnClipMask>

A CSS mask this layer composites through; it does not cut the hit test.

§parent: Option<Arc<VnClipNode>>

The clip around this one, if any.

Implementations§

Source§

impl VnClipNode

Source

pub fn contains(&self, p: [f32; 2]) -> bool

Whether the window device pixel p is inside this clip and every one around it.

Source

pub fn outermost_first(this: &Arc<VnClipNode>) -> Vec<Arc<VnClipNode>>

The chain from the outermost clip in.

Source

pub fn inside_of( this: &Arc<VnClipNode>, base: Option<&Arc<VnClipNode>>, ) -> Vec<Arc<VnClipNode>>

Self::outermost_first without the clips base is already inside of: the layers a draw deferred from inside base reopens when it paints within it.

Source

pub fn color_filters(clip: &Option<Arc<VnClipNode>>) -> Option<Arc<VnClipNode>>

Fixed-position descendants can escape geometric clips, but remain in their ancestors’ color-filter groups until those groups composite.

Source

pub fn same(a: &Option<Arc<VnClipNode>>, b: &Option<Arc<VnClipNode>>) -> bool

Two chains are the same clip: the same shapes, nested the same way.

Trait Implementations§

Source§

impl Debug for VnClipNode

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

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> ErasedDestructor for T
where T: 'static,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

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

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

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.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

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

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

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