FileDocCategorySizeDatePackage
ClipRectAnimation.javaAPI DocAndroid 5.1 API2001Thu Mar 12 22:22:10 GMT 2015android.view.animation

ClipRectAnimation

public class ClipRectAnimation extends Animation
An animation that controls the clip of an object. See the {@link android.view.animation full package} description for details and sample code.
hide

Fields Summary
private android.graphics.Rect
mFromRect
private android.graphics.Rect
mToRect
Constructors Summary
public ClipRectAnimation(android.graphics.Rect fromClip, android.graphics.Rect toClip)
Constructor to use when building a ClipRectAnimation from code

param
fromClip the clip rect to animate from
param
toClip the clip rect to animate to


                                  
         
        if (fromClip == null || toClip == null) {
            throw new RuntimeException("Expected non-null animation clip rects");
        }
        mFromRect.set(fromClip);
        mToRect.set(toClip);
    
Methods Summary
protected voidapplyTransformation(float it, Transformation tr)

        int l = mFromRect.left + (int) ((mToRect.left - mFromRect.left) * it);
        int t = mFromRect.top + (int) ((mToRect.top - mFromRect.top) * it);
        int r = mFromRect.right + (int) ((mToRect.right - mFromRect.right) * it);
        int b = mFromRect.bottom + (int) ((mToRect.bottom - mFromRect.bottom) * it);
        tr.setClipRect(l, t, r, b);
    
public booleanwillChangeTransformationMatrix()

        return false;