FileDocCategorySizeDatePackage
FrameSequence.javaAPI DocAndroid 5.1 API5175Thu Mar 12 22:22:48 GMT 2015android.support.rastermill

FrameSequence

public class FrameSequence extends Object

Fields Summary
private final long
mNativeFrameSequence
private final int
mWidth
private final int
mHeight
private final boolean
mOpaque
private final int
mFrameCount
private final int
mDefaultLoopCount
Constructors Summary
private FrameSequence(long nativeFrameSequence, int width, int height, boolean opaque, int frameCount, int defaultLoopCount)

        mNativeFrameSequence = nativeFrameSequence;
        mWidth = width;
        mHeight = height;
        mOpaque = opaque;
        mFrameCount = frameCount;
        mDefaultLoopCount = defaultLoopCount;
    
Methods Summary
android.support.rastermill.FrameSequence$StatecreateState()

        if (mNativeFrameSequence == 0) {
            throw new IllegalStateException("attempted to use incorrectly built FrameSequence");
        }

        long nativeState = nativeCreateState(mNativeFrameSequence);
        if (nativeState == 0) {
            return null;
        }
        return new State(nativeState);
    
public static android.support.rastermill.FrameSequencedecodeByteArray(byte[] data)

        return decodeByteArray(data, 0, data.length);
    
public static android.support.rastermill.FrameSequencedecodeByteArray(byte[] data, int offset, int length)

        if (data == null) throw new IllegalArgumentException();
        if (offset < 0 || length < 0 || (offset + length > data.length)) {
            throw new IllegalArgumentException("invalid offset/length parameters");
        }
        return nativeDecodeByteArray(data, offset, length);
    
public static android.support.rastermill.FrameSequencedecodeStream(java.io.InputStream stream)

        if (stream == null) throw new IllegalArgumentException();
        byte[] tempStorage = new byte[16 * 1024]; // TODO: use buffer pool
        return nativeDecodeStream(stream, tempStorage);
    
protected voidfinalize()

        try {
            if (mNativeFrameSequence != 0) nativeDestroyFrameSequence(mNativeFrameSequence);
        } finally {
            super.finalize();
        }
    
public intgetDefaultLoopCount()

 return mDefaultLoopCount; 
public intgetFrameCount()

 return mFrameCount; 
public intgetHeight()

 return mHeight; 
public intgetWidth()

 return mWidth; 
public booleanisOpaque()

 return mOpaque; 
private static native longnativeCreateState(long nativeFrameSequence)

private static native android.support.rastermill.FrameSequencenativeDecodeByteArray(byte[] data, int offset, int length)

private static native android.support.rastermill.FrameSequencenativeDecodeStream(java.io.InputStream is, byte[] tempStorage)

private static native voidnativeDestroyFrameSequence(long nativeFrameSequence)

private static native voidnativeDestroyState(long nativeState)

private static native longnativeGetFrame(long nativeState, int frameNr, android.graphics.Bitmap output, int previousFrameNr)