Linear Gradient
A linear gradient effect.
You may wish to use the convenience builder functions provided in horizontalGradient and verticalGradient for more common use cases.
The preferPerformance flag below can be set to tell Haze how to handle the progressive effect in certain situations:
On certain platforms (Android SDK 32), drawing the progressive effect is inefficient. When preferPerformance is set to true, Haze will use a mask when running on those platforms, which is far more performant.
Parameters
The easing function to use when applying the effect. Defaults to a linear easing effect.
Starting position of the gradient. Defaults to Offset.Zero which represents the top-left of the drawing area.
The intensity of the haze effect at the start, in the range
0f..1f.
Ending position of the gradient. Defaults to Offset.Infinite which represents the bottom-right of the drawing area.
The intensity of the haze effect at the end, in the range
0f..1f
Whether Haze should prefer performance (when true), or quality (when false). See above for more information.