Android
android.view.animation
public class

android.view.animation.Transformation

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

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

Summary

Fields

public  static    int  TYPE_ALPHA  Indicates a transformation that applies an alpha only (uses an identity matrix.)  
public  static    int  TYPE_BOTH  Indicates a transformation that applies an alpha and a matrix. 
public  static    int  TYPE_IDENTITY  Indicates a transformation that has no effect (alpha = 1 and identity matrix.)  
public  static    int  TYPE_MATRIX  Indicates a transformation that applies a matrix only (alpha = 1.)  
protected      float  mAlpha   
protected      Matrix  mMatrix   
protected      int  mTransformationType   

Public Constructors

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

Public Methods

          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

Details

Fields

public static int TYPE_ALPHA

Indicates a transformation that applies an alpha only (uses an identity matrix.)

public static int TYPE_BOTH

Indicates a transformation that applies an alpha and a matrix.

public static int TYPE_IDENTITY

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

public static int TYPE_MATRIX

Indicates a transformation that applies a matrix only (alpha = 1.)

protected float mAlpha

protected Matrix mMatrix

protected int mTransformationType

Public Constructors

public Transformation()

Creates a new transformation with alpha = 1 and the identity matrix.

Public Methods

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.

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.

public float getAlpha()

Returns

  • The degree of transparency

public Matrix getMatrix()

Returns

  • The 3x3 Matrix representing the trnasformation to apply to the coordinates of the object being animated

public int getTransformationType()

Indicates the nature of this transformation.

public void set(Transformation t)

Clones the specified transformation.

Parameters

t The transformation to clone.

public void setAlpha(float alpha)

Sets the degree of transparency

Parameters

alpha 1.0 means fully opaqe and 0.0 means fully transparent

public void setTransformationType(int transformationType)

Sets the transformation type.

Parameters

transformationType One of TYPE_ALPHA, TYPE_MATRIX, TYPE_BOTH or TYPE_IDENTITY.

public String toString()

Returns a string containing a concise, human-readable description of the receiver.

Returns

  • String a printable representation for the receiver.
Copyright 2007 Google Inc. Build 0.9_r1-98467 - 14 Aug 2008 18:56