pub struct ShadowParams {
pub offset_x: f32,
pub offset_y: f32,
pub blur: f32,
pub spread: f32,
pub color: Color,
pub placement: ShadowPlacement,
}Expand description
A soft shadow of a rounded box, as CSS box-shadow describes one.
Fields§
§offset_x: f32§offset_y: f32§blur: f32The blur radius, as in CSS: the shadow’s edge is blurred by a Gaussian whose standard deviation is half of it.
spread: f32How far the shadow’s box grows past the casting box before it is blurred; an inside shadow’s box shrinks by it instead.
color: Color§placement: ShadowPlacementImplementations§
Source§impl ShadowParams
impl ShadowParams
Sourcepub const fn new(
offset_x: f32,
offset_y: f32,
blur: f32,
spread: f32,
color: Color,
) -> ShadowParams
pub const fn new( offset_x: f32, offset_y: f32, blur: f32, spread: f32, color: Color, ) -> ShadowParams
A shadow drawn behind its box.
Sourcepub const fn glow(blur: f32, spread: f32, color: Color) -> ShadowParams
pub const fn glow(blur: f32, spread: f32, color: Color) -> ShadowParams
A glow: a halo with no offset, drawn outside its box only.
Sourcepub const fn inset(
offset_x: f32,
offset_y: f32,
blur: f32,
spread: f32,
color: Color,
) -> ShadowParams
pub const fn inset( offset_x: f32, offset_y: f32, blur: f32, spread: f32, color: Color, ) -> ShadowParams
An inner shadow, as CSS box-shadow: inset.
pub const fn with_placement(self, placement: ShadowPlacement) -> ShadowParams
Trait Implementations§
Source§impl Clone for ShadowParams
impl Clone for ShadowParams
Source§fn clone(&self) -> ShadowParams
fn clone(&self) -> ShadowParams
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ShadowParams
Source§impl Debug for ShadowParams
impl Debug for ShadowParams
Source§impl PartialEq for ShadowParams
impl PartialEq for ShadowParams
impl StructuralPartialEq for ShadowParams
Auto Trait Implementations§
impl Forget for ShadowParams
impl Freeze for ShadowParams
impl Move for ShadowParams
impl RefUnwindSafe for ShadowParams
impl Send for ShadowParams
impl Sync for ShadowParams
impl Unpin for ShadowParams
impl UnsafeUnpin for ShadowParams
impl UnwindSafe for ShadowParams
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.