Companion

object Companion

Functions

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

Creates a DynamicShader out of the given bitmap.

Link copied to clipboard
fun component(component: Component, componentSizeDp: Float, checkeredArrangement: Boolean = true, tileXMode: Shader.TileMode = Shader.TileMode.REPEAT, tileYMode: Shader.TileMode = tileXMode): DynamicShader

Creates a DynamicShader that repeatedly draws component in a grid or checkered pattern.

Link copied to clipboard
@RequiresApi(value = 29)
fun compose(first: DynamicShader, second: DynamicShader, mode: BlendMode): DynamicShader

Creates a ComposeShader out of two DynamicShaders, combining first and second via mode.

Link copied to clipboard
fun horizontalGradient(vararg colors: Int): DynamicShader
fun horizontalGradient(colors: IntArray, positions: FloatArray? = null): DynamicShader

Creates a DynamicShader in the form of a horizontal gradient.

Link copied to clipboard
fun verticalGradient(vararg colors: Int): DynamicShader
fun verticalGradient(colors: IntArray, positions: FloatArray? = null): DynamicShader

Creates a DynamicShader in the form of a vertical gradient.