pub struct GlassMaterial {
pub blur_radius_intent: f64,
pub fills_light: Vec<GlassFill>,
pub fills_dark: Vec<GlassFill>,
pub hairline_alpha: f32,
pub shadow: ShadowSpec,
}Expand description
One glass tier’s recipe: how much background blur it intends, the translucent washes to composite over light and over dark content, its specular hairline alpha, and its drop shadow.
blur_radius_intent is an intent in the kit’s blur units, not a rendered
pixel radius — a later painting task maps it to the platform’s blur
primitive. 0.0 means “no lens”: the opaque-material path (see
GlassMaterial::is_opaque).
Fields§
§blur_radius_intent: f64Background-blur intent in a design system’s own blur units; 0.0 is
“no lens”, the opaque path GlassScale::opaque_material takes.
fills_light: Vec<GlassFill>Washes composited over light content, bottom-to-top.
fills_dark: Vec<GlassFill>Washes composited over dark content, bottom-to-top.
hairline_alpha: f32Alpha of the specular hairline edge (white over light, drawn by the
consuming widget). 0.0 on the opaque path.
shadow: ShadowSpecThe tier’s drop shadow.
Implementations§
Source§impl GlassMaterial
impl GlassMaterial
Sourcepub fn is_opaque(&self) -> bool
pub fn is_opaque(&self) -> bool
true when this material carries no background-blur intent — the
opaque-material path a widget takes on the Material design language,
where it paints its surface-container role instead of a lens. The
single-API branch that lets one widget read either design language.