#[repr(C)]pub struct BackdropBlur {Show 16 fields
pub order: DrawOrder,
pub blur_radius: ScaledPixels,
pub bounds: Bounds<ScaledPixels>,
pub content_mask: ContentMask<ScaledPixels>,
pub corner_radii: Corners<ScaledPixels>,
pub lens: ScaledPixels,
pub reach: ScaledPixels,
pub magnify: f32,
pub dispersion: f32,
pub gain: f32,
pub saturation: f32,
pub tint: Hsla,
pub edge: f32,
pub edge_width: ScaledPixels,
pub edge_aa: ScaledPixels,
pub opacity: f32,
}Expand description
A within-window backdrop blur region: the renderer snapshots everything
painted below this order and paints it back gaussian-blurred inside the
rounded bounds (frosted-glass popovers). Implemented by the Metal and wgpu
renderers — see crate::Window::paint_backdrop_blur.
Fields§
§order: DrawOrder§blur_radius: ScaledPixels§bounds: Bounds<ScaledPixels>§content_mask: ContentMask<ScaledPixels>§corner_radii: Corners<ScaledPixels>§lens: ScaledPixelsHow deep the lens profile reaches in from the rim; 0 paints a flat frost.
reach: ScaledPixelsThe furthest that profile may drag the backdrop.
magnify: f32Displacement amplitude. Signed: positive samples toward the centre, so the interior magnifies and what it displaces compresses at the rim; negative inverts that.
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; above 1 a surface can go dark without its colours going with it.
tint: HslaIts offset. Transparent leaves the blur bare.
edge: f32How much white the lit rim adds, 0..1.
edge_width: ScaledPixelsHow far in that light falls off to nothing.
edge_aa: ScaledPixelsWidth of the coverage ramp at the boundary. Zero is a hard edge.
opacity: f32The element tree’s opacity here. The pass replaces its region rather than blending, so a fading material has to mix itself back toward the untouched backdrop; this rides the coverage that already does it.
Trait Implementations§
Source§impl Clone for BackdropBlur
impl Clone for BackdropBlur
Source§fn clone(&self) -> BackdropBlur
fn clone(&self) -> BackdropBlur
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 BackdropBlur
Auto Trait Implementations§
impl Freeze for BackdropBlur
impl RefUnwindSafe for BackdropBlur
impl Send for BackdropBlur
impl Sync for BackdropBlur
impl Unpin for BackdropBlur
impl UnsafeUnpin for BackdropBlur
impl UnwindSafe for BackdropBlur
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