Build 1.0_r1(from source)

android.view.animation
Class Transformation

java.lang.Object
  extended by android.view.animation.Transformation

public class Transformation
extends Object

Defines the transformation to be applied at one point in time of an Animation.


Field Summary
protected  float mAlpha
           
protected  Matrix mMatrix
           
protected  int mTransformationType
           
static int TYPE_ALPHA
          Indicates a transformation that applies an alpha only (uses an identity matrix.)
static int TYPE_BOTH
          Indicates a transformation that applies an alpha and a matrix.
static int TYPE_IDENTITY
          Indicates a transformation that has no effect (alpha = 1 and identity matrix.)
static int TYPE_MATRIX
          Indicates a transformation that applies a matrix only (alpha = 1.)
 
Constructor Summary
Transformation()
          Creates a new transformation with alpha = 1 and the identity matrix.
 
Method Summary
 void clear()
          Reset the transformation to a state that leaves the object being animated in an unmodified state.
 void compose(Transformation t)
          Apply this Transformation to an existing Transformation, e.g.
 float getAlpha()
           
 Matrix getMatrix()
           
 int getTransformationType()
          Indicates the nature of this transformation.
 void set(Transformation t)
          Clones the specified transformation.
 void setAlpha(float alpha)
          Sets the degree of transparency
 void setTransformationType(int transformationType)
          Sets the transformation type.
 String toString()
          Returns a string containing a concise, human-readable description of the receiver.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TYPE_IDENTITY

public static int TYPE_IDENTITY
Indicates a transformation that has no effect (alpha = 1 and identity matrix.)


TYPE_ALPHA

public static int TYPE_ALPHA
Indicates a transformation that applies an alpha only (uses an identity matrix.)


TYPE_MATRIX

public static int TYPE_MATRIX
Indicates a transformation that applies a matrix only (alpha = 1.)


TYPE_BOTH

public static int TYPE_BOTH
Indicates a transformation that applies an alpha and a matrix.


mMatrix

protected Matrix mMatrix

mAlpha

protected float mAlpha

mTransformationType

protected int mTransformationType
Constructor Detail

Transformation

public Transformation()
Creates a new transformation with alpha = 1 and the identity matrix.

Method Detail

clear

public void clear()
Reset the transformation to a state that leaves the object being animated in an unmodified state. The transformation type is TYPE_BOTH by default.


getTransformationType

public int getTransformationType()
Indicates the nature of this transformation.

Returns:
TYPE_ALPHA, TYPE_MATRIX, TYPE_BOTH or TYPE_IDENTITY.

setTransformationType

public void setTransformationType(int transformationType)
Sets the transformation type.

Parameters:
transformationType - One of TYPE_ALPHA, TYPE_MATRIX, TYPE_BOTH or TYPE_IDENTITY.

set

public void set(Transformation t)
Clones the specified transformation.

Parameters:
t - The transformation to clone.

compose

public void compose(Transformation t)
Apply this Transformation to an existing Transformation, e.g. apply a scale effect to something that has already been rotated.

Parameters:
t -

getMatrix

public Matrix getMatrix()
Returns:
The 3x3 Matrix representing the trnasformation to apply to the coordinates of the object being animated

setAlpha

public void setAlpha(float alpha)
Sets the degree of transparency

Parameters:
alpha - 1.0 means fully opaqe and 0.0 means fully transparent

getAlpha

public float getAlpha()
Returns:
The degree of transparency

toString

public String toString()
Description copied from class: Object
Returns a string containing a concise, human-readable description of the receiver.

Overrides:
toString in class Object
Returns:
String a printable representation for the receiver.

Build 1.0_r1(from source)

Please submit a feedback, bug or feature