horizontalGradient

Creates a ShaderProvider that produces a horizontal gradient.


fun horizontalGradient(colors: IntArray, positions: FloatArray? = null): ShaderProvider

Creates a ShaderProvider that produces a horizontal gradient. positions specifies the color-stop offsets (between 0 and 1), with null giving an even distribution.