Shader(native)
Shader is the based class for objects that return horizontal spans of colors during drawing. A subclass of Shader is installed in a Paint calling paint.shader = shader. After that any object (other than a bitmap) that is drawn with that paint will get its color(s) from the shader.
Methods
-
bitmap(fileName, tileModeX, tileModeY) : Shader
Call this to create a new shader that will draw with the specified bitmap.
-
getLocalMatrix() : Matrix
Get the shader's local matrix.
-
linear(pts, clrs, pos, mode) : Shader
This function creates a linear gradient.
-
resetLocalMatrix() : Shader
Reset the shader's local matrix to identity.
-
setLocalMatrix(localMatrix) : Shader
Set the shader's local matrix.
-
sweep(cx, cy, clrs, pos) : Shader
This function creates a sweep gradient.