Back to Fresco

MovieFrame

docs/javadoc/reference/com/facebook/animated/giflite/draw/MovieFrame.html

3.6.015.6 KB
Original Source

Fresco

|

|

Packages | Classes

Classes

Packages | Classes

Summary: Ctors | Methods | Inherited Methods | [Expand All]

public class

MovieFrame

extends Object
implements AnimatedImageFrame

| java.lang.Object | | ↳ | com.facebook.animated.giflite.draw.MovieFrame |

Class Overview

Simple wrapper for an animated image frame back by MovieDrawer. All MovieFrame for the same MovieAnimatedImage will be backed by the same MovieDrawer.

Summary

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

| [Expand] Inherited Methods | | --- | | From class java.lang.Object

| Object | clone() | | boolean | equals(Object arg0) | | void | finalize() | | final Class<?> | getClass() | | int | hashCode() | | final void | notify() | | final void | notifyAll() | | String | toString() | | final void | wait(long arg0, int arg1) | | final void | wait(long arg0) | | final void | wait() |

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

| abstract void | dispose() Disposes the instance. | | abstract int | getDurationMs() Gets the duration of the frame. | | abstract int | getHeight() Gets the height of the frame. | | abstract int | getWidth() Gets the width of the frame. | | abstract int | getXOffset() Gets the x-offset of the frame relative to the image canvas. | | abstract int | getYOffset() Gets the y-offset of the frame relative to the image canvas. | | abstract void | renderFrame(int width, int height, Bitmap bitmap) Renders the frame to the specified bitmap. |

|

Public Constructors

public MovieFrame(MovieDrawer movieDrawer, int frameStart, int frameDuration, int frameWidth, int frameHeight, AnimatedDrawableFrameInfo.DisposalMethod disposalMode)

Public Methods

public 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 AnimatedDrawableFrameInfo.DisposalMethod getDisposalMode()

public int getDurationMs()

Gets the duration of the frame.

Returns
  • the duration of the frame in milliseconds

public int getHeight()

Gets the height of the frame.

Returns
  • the height of the frame

public int getWidth()

Gets the width of the frame.

Returns
  • the width of the frame

public int getXOffset()

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

Returns
  • the x-offset of the frame

public int getYOffset()

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

Returns
  • the y-offset of the frame

public void renderFrame(int w, int h, 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

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

+Generated by Doclava. +