pub struct GlassEffect {
pub blur_radius: Pixels,
pub lens: Pixels,
pub reach: Pixels,
pub magnify: f32,
pub dispersion: f32,
pub gain: f32,
pub saturation: f32,
pub tint: Hsla,
pub edge: f32,
pub edge_width: Pixels,
pub edge_aa: Pixels,
}Expand description
What a backdrop blur paints: the frost, the lens over it, and its tint. A struct rather than arguments so a new knob does not change every caller.
Fields§
§blur_radius: PixelsGaussian sigma applied to the snapshot. Zero skips the blur entirely.
lens: PixelsHow deep the lens profile reaches in from the rim. Zero paints flat.
reach: PixelsThe furthest the rim may drag the backdrop. The dome’s tilt runs to vertical at the rim, so the displacement needs a bound of its own.
magnify: f32Displacement amplitude; signed, so its sign picks the direction.
dispersion: f32Per-channel spread of the displacement — the chromatic fringe.
gain: f32Slope of out = gain * saturated(backdrop) + tint.
saturation: f32How far the backdrop’s chroma is pushed from its own grey, before the gain drops the level. 1 passes it through.
tint: HslaIts offset, added.
edge: f32How much white the lit rim adds, 0..1.
edge_width: PixelsHow far in that light falls off to nothing.
edge_aa: PixelsWidth of the coverage ramp at the shape’s boundary. Zero is a hard edge.
Trait Implementations§
Source§impl Clone for GlassEffect
impl Clone for GlassEffect
Source§fn clone(&self) -> GlassEffect
fn clone(&self) -> GlassEffect
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for GlassEffect
Auto Trait Implementations§
impl Freeze for GlassEffect
impl RefUnwindSafe for GlassEffect
impl Send for GlassEffect
impl Sync for GlassEffect
impl Unpin for GlassEffect
impl UnsafeUnpin for GlassEffect
impl UnwindSafe for GlassEffect
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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