Skip to main content

DropShadowEffect

Struct DropShadowEffect 

Source
pub struct DropShadowEffect { /* private fields */ }
Expand description

A DropShadowEffect casting a colored shadow behind an element’s visual.

Implementations§

Source§

impl DropShadowEffect

Source

pub fn raw(&self) -> *mut c_void

Raw Noesis::BaseComponent*. Borrowed for the lifetime of self.

Source§

impl DropShadowEffect

Source

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.

Source

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.

Source

pub fn params(&self) -> DropShadowParams

Read all shadow parameters back from the live object.

Source

pub fn set_params(&mut self, params: DropShadowParams)

Replace all shadow parameters from a DropShadowParams struct.

Source

pub fn set_color(&mut self, rgba: [f32; 4])

Set the shadow color {r, g, b, a}.

Source

pub fn set_blur_radius(&mut self, blur_radius: f32)

Set the blur radius of the shadow edge.

Source

pub fn set_direction(&mut self, direction: f32)

Set the shadow direction, in degrees.

Source

pub fn set_shadow_depth(&mut self, shadow_depth: f32)

Set the distance of the shadow from the content.

Source

pub fn set_opacity(&mut self, opacity: f32)

Set the shadow opacity, 0..=1.

Trait Implementations§

Source§

impl Drop for DropShadowEffect

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

fn pin_drop(self: Pin<&mut Self>)

🔬This is a nightly-only experimental API. (pin_ergonomics)
Execute the destructor for this type, but different to Drop::drop, it requires self to be pinned. Read more
Source§

impl Effect for DropShadowEffect

Source§

fn effect_raw(&self) -> *mut c_void

Borrowed Noesis::Effect* (a BaseComponent*), valid for self’s lifetime.
Source§

impl Send for DropShadowEffect

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.