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<'de> Deserialize<'de> for Shadow
impl<'de> Deserialize<'de> for Shadow
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Shadow, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Shadow, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for Shadow
impl Serialize for Shadow
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
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