pub enum ClipItemKind {
    Rectangle {
        rect: LayoutRect,
        mode: ClipMode,
    },
    RoundedRectangle {
        rect: LayoutRect,
        radius: BorderRadius,
        mode: ClipMode,
    },
    Image {
        image: ImageKey,
        rect: LayoutRect,
        polygon_handle: Option<Handle<PolygonIntern>>,
    },
    BoxShadow {
        source: BoxShadowClipSource,
    },
}Variants§
Implementations§
Source§impl ClipItemKind
 
impl ClipItemKind
pub fn new_box_shadow( shadow_rect_fract_offset: LayoutPoint, shadow_rect_size: LayoutSize, shadow_radius: BorderRadius, prim_shadow_rect: LayoutRect, blur_radius: f32, clip_mode: BoxShadowClipMode, ) -> Self
Sourcefn supports_fast_path_rendering(&self) -> bool
 
fn supports_fast_path_rendering(&self) -> bool
Returns true if this clip mask can run through the fast path for the given clip item type.
Note: this logic has to match ClipBatcher::add behavior.
pub fn get_local_clip_rect(&self) -> Option<LayoutRect>
fn get_clip_result_complex( &self, transform: &LayoutToVisTransform, prim_rect: &VisRect, culling_rect: &VisRect, ) -> ClipResult
fn get_clip_result(&self, prim_rect: &LayoutRect) -> ClipResult
Trait Implementations§
Source§impl Debug for ClipItemKind
 
impl Debug for ClipItemKind
Source§impl MallocSizeOf for ClipItemKind
 
impl MallocSizeOf for ClipItemKind
Source§fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
 
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
Measure the heap usage of all descendant heap-allocated structures, but
not the space taken up by the value itself.
Auto Trait Implementations§
impl Freeze for ClipItemKind
impl RefUnwindSafe for ClipItemKind
impl Send for ClipItemKind
impl Sync for ClipItemKind
impl Unpin for ClipItemKind
impl UnwindSafe for ClipItemKind
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> 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>
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 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>
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