pub enum ShadowPrimitive {
Drop {
shape: Box<DrawPrimitive>,
cutout: Option<Box<DrawPrimitive>>,
blur_radius: f32,
blend_mode: BlendMode,
},
Inner {
fill: Box<DrawPrimitive>,
cutout: Box<DrawPrimitive>,
blur_radius: f32,
blend_mode: BlendMode,
clip_rect: Rect,
},
}Expand description
A shadow that needs blur processing. Each renderer chooses how to blur. See
DrawPrimitive::Shadow.
Variants§
Drop
Drop shadow: render shape behind content, blurred. cutout knocks
the element’s own (unoffset) shape out of the silhouette before the
blur so translucent surfaces never sample their own shadow.
Fields
§
shape: Box<DrawPrimitive>The shape drawn and blurred behind the content.
§
cutout: Option<Box<DrawPrimitive>>Some cuts the element’s own unoffset shape out of the silhouette before the blur.
Inner
Inner shadow: render fill + cutout to offscreen, blur, clip to bounds.
Fields
§
fill: Box<DrawPrimitive>The shape drawn and blurred to make the shadow.
§
cutout: Box<DrawPrimitive>The shape cut out of the shadow’s silhouette, so it appears only outside that shape.
Trait Implementations§
Source§impl Clone for ShadowPrimitive
impl Clone for ShadowPrimitive
Source§impl Debug for ShadowPrimitive
impl Debug for ShadowPrimitive
Source§impl PartialEq for ShadowPrimitive
impl PartialEq for ShadowPrimitive
Source§impl RenderHash for ShadowPrimitive
impl RenderHash for ShadowPrimitive
Source§fn render_hash(&self) -> u64
fn render_hash(&self) -> u64
Returns a hash over exactly the values that change what is drawn. Equal values give equal
hashes.
impl StructuralPartialEq for ShadowPrimitive
Auto Trait Implementations§
impl !Send for ShadowPrimitive
impl !Sync for ShadowPrimitive
impl Freeze for ShadowPrimitive
impl RefUnwindSafe for ShadowPrimitive
impl Unpin for ShadowPrimitive
impl UnsafeUnpin for ShadowPrimitive
impl UnwindSafe for ShadowPrimitive
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