pub struct ClipEntry {
pub shape: ClipShape,
pub is_window_root: bool,
}Expand description
One clip pushed by layout or paint, preserving metadata that must not be fused away.
Shapes use window-space logical pixels once captured by a paint layer.
is_window_root remains attached even when rectangular bounds could be
intersected, allowing renderers to preserve surface-specific semantics.
§Examples
use ailloli_ui_core::{ClipShape, Rect};
use ailloli_ui_runtime::scene::ClipEntry;
let entry = ClipEntry::new(ClipShape::Rect(Rect::new(0.0, 0.0, 40.0, 20.0)), true);
assert!(entry.is_window_root);Fields§
§shape: ClipShapeGeometric clip shape in logical pixels.
is_window_root: boolWhether this clip represents the root surface/window boundary.
Implementations§
Source§impl ClipEntry
Provides the operations defined for ClipEntry.
impl ClipEntry
Provides the operations defined for ClipEntry.
Sourcepub fn new(shape: ClipShape, is_window_root: bool) -> Self
pub fn new(shape: ClipShape, is_window_root: bool) -> Self
Creates an entry without validating or normalizing the shape.
§Examples
use ailloli_ui_core::{ClipShape, Rect};
use ailloli_ui_runtime::scene::ClipEntry;
let entry = ClipEntry::new(ClipShape::Rect(Rect::new(1.0, 2.0, 3.0, 4.0)), false);
assert!(!entry.is_window_root);Trait Implementations§
impl Copy for ClipEntry
impl StructuralPartialEq for ClipEntry
Auto Trait Implementations§
impl Freeze for ClipEntry
impl RefUnwindSafe for ClipEntry
impl Send for ClipEntry
impl Sync for ClipEntry
impl Unpin for ClipEntry
impl UnwindSafe for ClipEntry
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<A> IntoClickAction<A> for Awhere
A: Clone + 'static,
impl<A> IntoClickAction<A> for Awhere
A: Clone + 'static,
Source§fn into_click_action(self) -> ClickAction<A>
fn into_click_action(self) -> ClickAction<A>
Implements the into_click_action helper used by this module.