Companion

object Companion

Functions

Link copied to clipboard
fun bitmap(bitmap: Bitmap, xTileMode: Shader.TileMode = Shader.TileMode.REPEAT, yTileMode: Shader.TileMode = xTileMode): ShaderProvider

Creates a BitmapShader-producing ShaderProvider.

Link copied to clipboard
fun component(component: Component, componentSizeDp: Float, checker: Boolean = true, xTileMode: Shader.TileMode = Shader.TileMode.REPEAT, yTileMode: Shader.TileMode = xTileMode): ShaderProvider

Creates a ShaderProvider that produces Shaders wherein component is repeatedly drawn in a grid or checkered pattern.

Link copied to clipboard
Link copied to clipboard

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.

Link copied to clipboard
fun verticalGradient(vararg colors: Int): ShaderProvider

Creates a ShaderProvider that produces a vertical gradient.

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

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