CacheableDynamicShader

CacheableDynamicShader can cache created Shader instances for reuse between identical sets of bounds.

Inheritors

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
abstract 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.

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

Creates a Shader by using the provided left, top, right, and bottom bounds.