HazeBlurStyleScope

sealed interface HazeBlurStyleScope

Blur-specific property functions available while building a HazeBlurStyle.

Property functions validate values when the Style's block runs. Invalid values throw IllegalArgumentException, except that blurRadius, noiseFactor and alpha are clamped into their valid ranges, so animation overshoot never throws.

Functions

Link copied to clipboard
abstract fun alpha(alpha: Float)

Sets the overall effect opacity, coerced to the range 0f..1f.

Link copied to clipboard
abstract fun backgroundColor(color: Color)

Sets the background color composited behind the blurred input.

Link copied to clipboard
abstract fun blurEnabled(enabled: Boolean)

Enables or disables the blur pass.

Link copied to clipboard
abstract fun blurRadius(radius: Dp)

Sets the blur radius. A negative radius, such as animation overshoot, is treated as zero.

Link copied to clipboard

Sets how content outside the input bounds contributes to the blur.

Link copied to clipboard
abstract fun colorEffects(effects: List<HazeColorEffect>)

Replaces the ordered color effects applied to the blurred input.

Link copied to clipboard
abstract fun fallbackColorEffect(effect: HazeColorEffect?)

Sets the effect used when blur rendering is unavailable.

Link copied to clipboard
abstract fun mask(mask: Brush?)

Sets the optional alpha mask applied to the complete effect.

Link copied to clipboard
abstract fun noiseFactor(factor: Float)

Sets the noise opacity, coerced to the range 0f..1f.

Link copied to clipboard
abstract fun progressive(progressive: HazeProgressive?)

Sets the optional progressive effect intensity.