pub enum CompoundFilter {
InnerShadow {
dx: f32,
dy: f32,
blur: f32,
color: AlphaColor<Srgb>,
},
Glow {
blur: f32,
color: AlphaColor<Srgb>,
},
Bevel {
angle: f32,
distance: f32,
highlight: AlphaColor<Srgb>,
shadow: AlphaColor<Srgb>,
},
Emboss {
angle: f32,
depth: f32,
amount: f32,
},
}Expand description
Pre-built compound effects for common use cases.
These effects combine multiple filter primitives into commonly-used visual effects. They provide a convenient high-level API for complex multi-step filter operations.
Note: These are planned but not yet implemented. Use FilterGraph to manually
construct these effects from primitives.
Variants§
InnerShadow
Inner shadow effect (shadow inside the shape).
Creates a shadow that appears inside the boundaries of the shape, giving a recessed or inset appearance. This is the opposite of a drop shadow.
Fields
color: AlphaColor<Srgb>Shadow color with alpha channel.
Glow
Glow effect around the shape.
Creates a soft glowing halo around the shape by blurring and compositing a colored version with the original.
Fields
color: AlphaColor<Srgb>Glow color with alpha channel.
Bevel
Bevel effect (3D raised/recessed appearance).
Creates a 3D beveled edge effect using lighting simulation, making the shape appear raised or recessed from the surface.
Fields
highlight: AlphaColor<Srgb>Color for the highlight (lit) side of the bevel.
shadow: AlphaColor<Srgb>Color for the shadow (dark) side of the bevel.
Emboss
Emboss effect for a raised relief appearance.
Creates an embossed/stamped appearance by simulating lighting on a raised surface based on the shape’s alpha channel.
Trait Implementations§
Source§impl Clone for CompoundFilter
impl Clone for CompoundFilter
Source§fn clone(&self) -> CompoundFilter
fn clone(&self) -> CompoundFilter
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for CompoundFilter
impl RefUnwindSafe for CompoundFilter
impl Send for CompoundFilter
impl Sync for CompoundFilter
impl Unpin for CompoundFilter
impl UnsafeUnpin for CompoundFilter
impl UnwindSafe for CompoundFilter
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more