pub struct DropShadowEffect { /* private fields */ }Expand description
A DropShadowEffect casting a colored shadow behind an element’s visual.
Implementations§
Source§impl DropShadowEffect
impl DropShadowEffect
Sourcepub fn from_params(params: DropShadowParams) -> Self
pub fn from_params(params: DropShadowParams) -> Self
Create a drop-shadow effect from a DropShadowParams struct (the
ergonomic alternative to the 5-positional-argument new).
§Panics
Panics if Noesis fails to allocate the effect.
Sourcepub fn new(
color: [f32; 4],
blur_radius: f32,
direction: f32,
shadow_depth: f32,
opacity: f32,
) -> Self
pub fn new( color: [f32; 4], blur_radius: f32, direction: f32, shadow_depth: f32, opacity: f32, ) -> Self
Create a drop-shadow effect with all parameters specified.
§Panics
Panics if Noesis fails to allocate the effect.
Sourcepub fn params(&self) -> DropShadowParams
pub fn params(&self) -> DropShadowParams
Read all shadow parameters back from the live object.
Sourcepub fn set_params(&mut self, params: DropShadowParams)
pub fn set_params(&mut self, params: DropShadowParams)
Replace all shadow parameters from a DropShadowParams struct.
Sourcepub fn set_blur_radius(&mut self, blur_radius: f32)
pub fn set_blur_radius(&mut self, blur_radius: f32)
Set the blur radius of the shadow edge.
Sourcepub fn set_direction(&mut self, direction: f32)
pub fn set_direction(&mut self, direction: f32)
Set the shadow direction, in degrees.
Sourcepub fn set_shadow_depth(&mut self, shadow_depth: f32)
pub fn set_shadow_depth(&mut self, shadow_depth: f32)
Set the distance of the shadow from the content.
Sourcepub fn set_opacity(&mut self, opacity: f32)
pub fn set_opacity(&mut self, opacity: f32)
Set the shadow opacity, 0..=1.
Trait Implementations§
Source§impl Drop for DropShadowEffect
impl Drop for DropShadowEffect
Source§impl Effect for DropShadowEffect
impl Effect for DropShadowEffect
Source§fn effect_raw(&self) -> *mut c_void
fn effect_raw(&self) -> *mut c_void
Borrowed
Noesis::Effect* (a BaseComponent*), valid for self’s
lifetime.impl Send for DropShadowEffect
Auto Trait Implementations§
impl !Sync for DropShadowEffect
impl Freeze for DropShadowEffect
impl RefUnwindSafe for DropShadowEffect
impl Unpin for DropShadowEffect
impl UnsafeUnpin for DropShadowEffect
impl UnwindSafe for DropShadowEffect
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