Developer   API   Graphics   Shader

  •  Config(0)
  •  Properties(0)
  •  Methods(6)
  •  Events(0)

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.
API Navigation
Skip Navigation Links.
Expand <span>User Interface</span> User Interface
Expand <span>Core & System</span> Core & System
Collapse <span>Graphics</span> Graphics
Canvas
Paint
Bitmap
Typeface
Path
Matrix
Shader
ColorFilter
MaskFilter
Expand <span>Files and Databases</span> Files and Databases
Expand <span>Crypto</span> Crypto
Expand <span>Native User Interface</span> Native User Interface
Expand <span>Net</span> Net
Expand <span>Media</span> Media
Expand <span>Sensor</span> Sensor
Expand <span>Game Development</span> Game Development