public class

AnimatedDrawableBackendFrameRenderer

extends Object
implements BitmapFrameRenderer
java.lang.Object
   ↳ com.facebook.fresco.animation.bitmap.wrapper.AnimatedDrawableBackendFrameRenderer

Class Overview

BitmapFrameRenderer that wraps around an AnimatedDrawableBackend.

Summary

Public Constructors
AnimatedDrawableBackendFrameRenderer(BitmapFrameCache bitmapFrameCache, AnimatedDrawableBackend animatedDrawableBackend)
Public Methods
int getIntrinsicHeight()
Return the intrinsic height of bitmap frames.
int getIntrinsicWidth()
Return the intrinsic width of bitmap frames.
boolean renderFrame(int frameNumber, Bitmap targetBitmap)
Render the frame for the given frame number to the target bitmap.
void setBounds(Rect bounds)
Set the parent drawable bounds to be used for frame rendering.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.facebook.fresco.animation.bitmap.BitmapFrameRenderer

Public Constructors

public AnimatedDrawableBackendFrameRenderer (BitmapFrameCache bitmapFrameCache, AnimatedDrawableBackend animatedDrawableBackend)

Public Methods

public int getIntrinsicHeight ()

Return the intrinsic height of bitmap frames. Return INTRINSIC_DIMENSION_UNSET if no specific height is set.

Returns
  • the intrinsic height

public int getIntrinsicWidth ()

Return the intrinsic width of bitmap frames. Return INTRINSIC_DIMENSION_UNSET if no specific width is set.

Returns
  • the intrinsic width

public boolean renderFrame (int frameNumber, Bitmap targetBitmap)

Render the frame for the given frame number to the target bitmap.

Parameters
frameNumber the frame number to render
targetBitmap the bitmap to render the frame in
Returns
  • true if successful

public void setBounds (Rect bounds)

Set the parent drawable bounds to be used for frame rendering.

Parameters
bounds the bounds to use