HazeBlurStyle

class HazeBlurStyle(val backgroundColor: Color = Color.Unspecified, colorEffects: List<HazeColorEffect>? = null, val blurRadius: Dp = Dp.Unspecified, val noiseFactor: Float = -1f, val fallbackColorEffect: HazeColorEffect = HazeColorEffect.Unspecified)

A holder for the style properties used by Haze.

Can be set via dev.chrisbanes.haze.hazeSource and dev.chrisbanes.haze.hazeEffect.

Constructors

Link copied to clipboard
constructor(backgroundColor: Color = Color.Unspecified, colorEffects: List<HazeColorEffect>? = null, blurRadius: Dp = Dp.Unspecified, noiseFactor: Float = -1f, fallbackColorEffect: HazeColorEffect = HazeColorEffect.Unspecified)
constructor(backgroundColor: Color = Color.Unspecified, colorEffect: HazeColorEffect? = null, blurRadius: Dp = Dp.Unspecified, noiseFactor: Float = -1f, fallbackColorEffect: HazeColorEffect = HazeColorEffect.Unspecified)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Color to draw behind the blurred content. Ideally should be opaque so that the original content is not visible behind. Typically this would be MaterialTheme.colorScheme.surface or similar.

Link copied to clipboard

Radius of the blur.

Link copied to clipboard

The HazeTints to apply to the blurred content.

Link copied to clipboard

The HazeTint to use when Haze uses the fallback scrim functionality. The scrim used whenever blurring is disabled, either because the host platform does not support blurring, or it has been manually disabled. When the fallback tint is used, the tints provided in colorEffects are ignored.

Link copied to clipboard

Amount of noise applied to the content, in the range 0f to 1f. Anything outside of that range will be clamped.

Functions

Link copied to clipboard
operator fun component1(): Color
Link copied to clipboard
Link copied to clipboard
operator fun component3(): Dp
Link copied to clipboard
operator fun component4(): Float
Link copied to clipboard
operator fun component5(): HazeColorEffect
Link copied to clipboard
fun copy(backgroundColor: Color = this.backgroundColor, colorEffects: List<HazeColorEffect>? = this.specifiedColorEffects, blurRadius: Dp = this.blurRadius, noiseFactor: Float = this.noiseFactor, fallbackColorEffect: HazeColorEffect = this.fallbackColorEffect): HazeBlurStyle
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String