Build 1.0_r1(from source)

android.graphics
Class Shader

java.lang.Object
  extended by android.graphics.Shader
Direct Known Subclasses:
BitmapShader, ComposeShader, LinearGradient, RadialGradient, SweepGradient

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.


Nested Class Summary
static class Shader.TileMode
           
 
Field Summary
(package private)  int native_instance
           
 
Constructor Summary
Shader()
           
 
Method Summary
protected  void finalize()
          Called by the virtual machine when there are no longer any (non-weak) references to the receiver.
 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.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

native_instance

int native_instance
Constructor Detail

Shader

public Shader()
Method Detail

getLocalMatrix

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

setLocalMatrix

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

finalize

protected void finalize()
                 throws Throwable
Description copied from class: Object
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.

Overrides:
finalize in class Object
Throws:
Throwable - The virtual machine ignores any exceptions which are thrown during finalization.

Build 1.0_r1(from source)

Please submit a feedback, bug or feature