public interface

BitmapFrameRenderer

com.facebook.fresco.animation.bitmap.BitmapFrameRenderer
Known Indirect Subclasses

Class Overview

Bitmap frame renderer used by BitmapAnimationBackend to render animated images (e.g. GIFs or animated WebPs).

Summary

Public Methods
abstract int getIntrinsicHeight()
Return the intrinsic height of bitmap frames.
abstract int getIntrinsicWidth()
Return the intrinsic width of bitmap frames.
abstract boolean renderFrame(int frameNumber, Bitmap targetBitmap)
Render the frame for the given frame number to the target bitmap.
abstract void setBounds(Rect bounds)
Set the parent drawable bounds to be used for frame rendering.

Public Methods

public abstract int getIntrinsicHeight ()

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

Returns
  • the intrinsic height

public abstract int getIntrinsicWidth ()

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

Returns
  • the intrinsic width

public abstract 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 abstract void setBounds (Rect bounds)

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

Parameters
bounds the bounds to use