pub struct BlurRequest {
pub source_region: Region,
pub target_rect: Region,
pub strength: BlurStrength,
pub tint: Tint,
pub corner_radius: CornerRadius,
pub opacity: Opacity,
}Expand description
The one backend-agnostic bundle that crosses the seam. source_region says where the
backdrop lives in the source texture; target_rect says where to composite the frosted
surface in the target. Both carry independent sizes and scales (DESIGN §4.1/§4.3).
Fields§
§source_region: RegionWhere the backdrop to blur lives in the source texture (physical px + its scale).
target_rect: RegionWhere to composite the frosted surface in the target (physical px + its scale).
strength: BlurStrengthHow much blur (logical points).
tint: TintThe glass film.
corner_radius: CornerRadiusHow round the surface corners are (logical points).
opacity: OpacitySurface-global fade coverage [0, 1] — how present the whole surface is (default 1.0).
Implementations§
Source§impl BlurRequest
impl BlurRequest
Sourcepub fn physical_blur_radius(&self) -> f32
pub fn physical_blur_radius(&self) -> f32
The physical-pixel blur radius, resolved against the source region’s scale.
The blur convolution happens in source-texture pixel space, so this is the only correct
scale; pinning it here (rather than exposing a bare strength.to_physical_radius(scale))
means a backend cannot accidentally resolve against target_rect.scale on a
mismatched-DPI surface. Mirrors how ResolvedMask::from_target pins the target scale
for the corner radius.
Trait Implementations§
Source§impl Clone for BlurRequest
impl Clone for BlurRequest
Source§fn clone(&self) -> BlurRequest
fn clone(&self) -> BlurRequest
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 BlurRequest
Source§impl Debug for BlurRequest
impl Debug for BlurRequest
Source§impl PartialEq for BlurRequest
impl PartialEq for BlurRequest
Source§fn eq(&self, other: &BlurRequest) -> bool
fn eq(&self, other: &BlurRequest) -> bool
self and other values to be equal, and is used by ==.