Enum webrender::clip::ClipItemKind
source · 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: &LayoutToWorldTransform, prim_world_rect: &WorldRect, world_rect: &WorldRect, ) -> 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