pub struct Shadow {
pub offset: Vec2,
pub blur: f32,
pub spread: f32,
pub color: Color32,
}
Expand description
The color and fuzziness of a fuzzy shape.
Can be used for a rectangular shadow with a soft penumbra.
Very similar to a box-shadow in CSS.
Fields§
§offset: Vec2
Move the shadow by this much.
For instance, a value of [1.0, 2.0]
will move the shadow 1 point to the right and 2 points down,
causing a drop-shadow effect.
blur: f32
The width of the blur, i.e. the width of the fuzzy penumbra.
A value of 0.0 means a sharp shadow.
spread: f32
Expand the shadow in all directions by this much.
color: Color32
Color of the opaque center of the shadow.
Implementations§
Trait Implementations§
source§impl PartialEq for Shadow
impl PartialEq for Shadow
impl Copy for Shadow
impl StructuralPartialEq for Shadow
Auto Trait Implementations§
impl Freeze for Shadow
impl RefUnwindSafe for Shadow
impl Send for Shadow
impl Sync for Shadow
impl Unpin for Shadow
impl UnwindSafe for Shadow
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