Android
android.graphics
public class

android.graphics.Shader

java.lang.Object
android.graphics.Shader

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.

Nested Classes
Known Direct Subclasses

Summary

Public Constructors

            Shader()

Public Methods

          boolean  getLocalMatrix(Matrix localM)
Return true if the shader has a non-identity local matrix.
          void  setLocalMatrix(Matrix localM)
Set the shader's local matrix.

Protected Methods

          void  finalize()
Called by the virtual machine when there are no longer any (non-weak) references to the receiver.
Methods inherited from class java.lang.Object

Details

Public Constructors

public Shader()

Public Methods

public boolean getLocalMatrix(Matrix localM)

Return true if the shader has a non-identity local matrix.

Parameters

localM If not null, it is set to the shader's local matrix.

Returns

  • true if the shader has a non-identity local matrix

public void setLocalMatrix(Matrix localM)

Set the shader's local matrix. Passing null will reset the shader's matrix to identity

Parameters

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

Protected Methods

protected void finalize()

Called by the virtual machine when there are no longer any (non-weak) references to the receiver. Subclasses can use this facility to guarantee that any associated resources are cleaned up before the receiver is garbage collected. Uncaught exceptions which are thrown during the running of the method cause it to terminate immediately, but are otherwise ignored.

Note: The virtual machine assumes that the implementation in class Object is empty.

Throws

Throwable
Copyright 2007 Google Inc. Build 0.9_r1-98467 - 14 Aug 2008 18:56