FileDocCategorySizeDatePackage
Shader.javaAPI DocAndroid 1.5 API2859Wed May 06 22:42:00 BST 2009android.graphics

Shader

public class Shader extends Object
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.setShader(shader). After that any object (other than a bitmap) that is drawn with that paint will get its color(s) from the shader.

Fields Summary
int
native_instance
Constructors Summary
Methods Summary
protected voidfinalize()

        nativeDestructor(native_instance);
    
public booleangetLocalMatrix(Matrix localM)
Return true if the shader has a non-identity local matrix.

param
localM If not null, it is set to the shader's local matrix.
return
true if the shader has a non-identity local matrix

        return nativeGetLocalMatrix(native_instance, localM.native_instance);
    
private static native voidnativeDestructor(int native_shader)

private static native booleannativeGetLocalMatrix(int native_shader, int matrix_instance)

private static native voidnativeSetLocalMatrix(int native_shader, int matrix_instance)

public voidsetLocalMatrix(Matrix localM)
Set the shader's local matrix. Passing null will reset the shader's matrix to identity

param
localM The shader's new local matrix, or null to specify identity

        nativeSetLocalMatrix(native_instance,
                             localM != null ? localM.native_instance : 0);