Shader

class Shader : RefCnt

Shaders specify the source color(s) for what is being drawn. If a paint has no shader, then the paint's color is used. If the paint has a shader, then the shader's color(s) are use instead, but they are modulated by the paint's alpha. This makes it easy to create a shader once (e.g. bitmap tiling or gradient) and then change its transparency w/o having to modify the original shader... only the paint's alpha needs to be modified.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
expect open val isClosed: Boolean

Check if underlying resource is closed.

Link copied to clipboard
expect val refCount: Int

Number of references on underlying native object.

Functions

Link copied to clipboard
expect open fun close()

Free underlying native resource, peer is useless afterwards.

Link copied to clipboard

Create a new shader that produces the same colors as invoking this shader and then applying the colorfilter.

Link copied to clipboard

Return a shader that will apply the specified localMatrix to this shader. The specified matrix will be applied before any matrix associated with this shader.

Link copied to clipboard
expect open override fun toString(): String