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
impl VnClipNode
Sourcepub fn contains(&self, p: [f32; 2]) -> bool
pub fn contains(&self, p: [f32; 2]) -> bool
Whether the window device pixel p is inside this clip and every
one around it.
Sourcepub fn outermost_first(this: &Arc<VnClipNode>) -> Vec<Arc<VnClipNode>>
pub fn outermost_first(this: &Arc<VnClipNode>) -> Vec<Arc<VnClipNode>>
The chain from the outermost clip in.
Sourcepub fn inside_of(
this: &Arc<VnClipNode>,
base: Option<&Arc<VnClipNode>>,
) -> Vec<Arc<VnClipNode>>
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.
Sourcepub fn color_filters(clip: &Option<Arc<VnClipNode>>) -> Option<Arc<VnClipNode>>
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.
Sourcepub fn same(a: &Option<Arc<VnClipNode>>, b: &Option<Arc<VnClipNode>>) -> bool
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§
Auto Trait Implementations§
impl !RefUnwindSafe for VnClipNode
impl !Send for VnClipNode
impl !Sync for VnClipNode
impl !UnwindSafe for VnClipNode
impl Forget for VnClipNode
impl Freeze for VnClipNode
impl Move for VnClipNode
impl Unpin for VnClipNode
impl UnsafeUnpin for VnClipNode
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
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
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