-
- All Implemented Interfaces:
-
java.io.Closeable,java.lang.AutoCloseable
public final class AnimationFrames implements Closeable
Represents the bitmaps of one animation.
-
-
Method Summary
Modifier and Type Method Description final Map<Integer, CloseableReference<Bitmap>>getFrames()final IntegergetSizeBytes()Calculate the size of animation final CloseableReference<Bitmap>getFrame(Integer frameIndex)Return the bitmap (if exists) given a the animation frame. Unitclose()Release the stored bitmaps -
-
Constructor Detail
-
AnimationFrames
AnimationFrames(Map<Integer, CloseableReference<Bitmap>> bitmapsByFrame, Map<Integer, Integer> realToCompressIndexMap)
- Parameters:
bitmapsByFrame- are amount of final bitmap that we will render given a frame index.realToCompressIndexMap- If animation was reduced, this map describes the equivalence between original frame number and reduced frame number
-
-
Method Detail
-
getSizeBytes
final Integer getSizeBytes()
Calculate the size of animation
-
getFrame
final CloseableReference<Bitmap> getFrame(Integer frameIndex)
Return the bitmap (if exists) given a the animation frame.
- Parameters:
frameIndex- Frame index in original animation (not reduced animation frame number).
-
-
-
-