Back to Fresco

AnimatedImageFrame

docs/javadoc/reference/com/facebook/imagepipeline/animated/base/AnimatedImageFrame.html

3.6.014.1 KB
Original Source

Fresco

|

|

Packages | Classes

Interfaces

Classes

Enums

Packages | Classes

Summary: Methods | [Expand All]

public interface

AnimatedImageFrame

| com.facebook.imagepipeline.animated.base.AnimatedImageFrame |

| Known Indirect Subclasses

GifFrame, MovieFrame, WebPFrame

| GifFrame | A single frame of a GifImage. | | MovieFrame | Simple wrapper for an animated image frame back by MovieDrawer. | | WebPFrame | A single frame of a WebPImage. |

|

Class Overview

Common interface for a frame of an animated image.

Summary

Public Methods
abstract void
Disposes the instance.
abstract int
Gets the duration of the frame.
abstract int
Gets the height of the frame.
abstract int
Gets the width of the frame.
abstract int
Gets the x-offset of the frame relative to the image canvas.
abstract int
Gets the y-offset of the frame relative to the image canvas.
abstract void
Renders the frame to the specified bitmap.

Public Methods

public abstract void dispose()

Disposes the instance. This will free native resources held by this instance. Once called, other methods on this instance may throw. Note, the underlying native resources may not actually be freed until all associated instances AnimatedImage are disposed or finalized as well.

public abstract int getDurationMs()

Gets the duration of the frame.

Returns
  • the duration of the frame in milliseconds

public abstract int getHeight()

Gets the height of the frame.

Returns
  • the height of the frame

public abstract int getWidth()

Gets the width of the frame.

Returns
  • the width of the frame

public abstract int getXOffset()

Gets the x-offset of the frame relative to the image canvas.

Returns
  • the x-offset of the frame

public abstract int getYOffset()

Gets the y-offset of the frame relative to the image canvas.

Returns
  • the y-offset of the frame

public abstract void renderFrame(int width, int height, Bitmap bitmap)

Renders the frame to the specified bitmap. The bitmap must have a width and height that is at least as big as the specified width and height and it must be in RGBA_8888 color format.

Parameters

| width | the width to render to (the image is scaled to this width) | | height | the height to render to (the image is scaled to this height) | | bitmap | the bitmap to render into |

+Generated by Doclava. +