ComponentShader

class ComponentShader(component: Component, componentSizeDp: Float, checkeredArrangement: Boolean = true, tileXMode: Shader.TileMode = Shader.TileMode.REPEAT, tileYMode: Shader.TileMode = tileXMode) : CacheableDynamicShader

ComponentShader creates a Shader out of the provided component.

Constructors

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

Functions

Link copied to clipboard
open override fun createShader(context: DrawContext, left: Float, top: Float, right: Float, bottom: Float): Shader

Called when new instance of Shader must be created, as the left, top, right, and bottom bounds have changed or there is no cached Shader.