Methods Summary |
---|
public void | clear()Reset the transformation to a state that leaves the object
being animated in an unmodified state. The transformation type is
{@link #TYPE_BOTH} by default.
if (mMatrix == null) {
mMatrix = new Matrix();
} else {
mMatrix.reset();
}
mClipRect.setEmpty();
mHasClipRect = false;
mAlpha = 1.0f;
mTransformationType = TYPE_BOTH;
|
public void | compose(android.view.animation.Transformation t)Apply this Transformation to an existing Transformation, e.g. apply
a scale effect to something that has already been rotated.
mAlpha *= t.getAlpha();
mMatrix.preConcat(t.getMatrix());
if (t.mHasClipRect) {
setClipRect(t.getClipRect());
}
|
public float | getAlpha()
return mAlpha;
|
public android.graphics.Rect | getClipRect()Returns the current Transform's clip rect
return mClipRect;
|
public android.graphics.Matrix | getMatrix()
return mMatrix;
|
public int | getTransformationType()Indicates the nature of this transformation.
return mTransformationType;
|
public boolean | hasClipRect()Returns whether the current Transform's clip rect is set
return mHasClipRect;
|
public void | postCompose(android.view.animation.Transformation t)Like {@link #compose(Transformation)} but does this.postConcat(t) of
the transformation matrix.
mAlpha *= t.getAlpha();
mMatrix.postConcat(t.getMatrix());
if (t.mHasClipRect) {
setClipRect(t.getClipRect());
}
|
public void | printShortString(java.io.PrintWriter pw)Print short string, to optimize dumping.
pw.print("{alpha="); pw.print(mAlpha);
pw.print(" matrix=");
mMatrix.printShortString(pw);
pw.print('}");
|
public void | set(android.view.animation.Transformation t)Clones the specified transformation.
mAlpha = t.getAlpha();
mMatrix.set(t.getMatrix());
if (t.mHasClipRect) {
setClipRect(t.getClipRect());
} else {
mHasClipRect = false;
mClipRect.setEmpty();
}
mTransformationType = t.getTransformationType();
|
public void | setAlpha(float alpha)Sets the degree of transparency
mAlpha = alpha;
|
public void | setClipRect(android.graphics.Rect r)Sets the current Transform's clip rect
setClipRect(r.left, r.top, r.right, r.bottom);
|
public void | setClipRect(int l, int t, int r, int b)Sets the current Transform's clip rect
mClipRect.set(l, t, r, b);
mHasClipRect = true;
|
public void | setTransformationType(int transformationType)Sets the transformation type.
mTransformationType = transformationType;
|
public java.lang.String | toShortString()Return a string representation of the transformation in a compact form.
StringBuilder sb = new StringBuilder(64);
toShortString(sb);
return sb.toString();
|
public void | toShortString(java.lang.StringBuilder sb)
sb.append("{alpha="); sb.append(mAlpha);
sb.append(" matrix="); mMatrix.toShortString(sb);
sb.append('}");
|
public java.lang.String | toString()
StringBuilder sb = new StringBuilder(64);
sb.append("Transformation");
toShortString(sb);
return sb.toString();
|