-
public interface AnimatedImageFrameCommon interface for a frame of an animated image.
-
-
Method Summary
Modifier and Type Method Description abstract voiddispose()Disposes the instance. abstract voidrenderFrame(int width, int height, Bitmap bitmap)Renders the frame to the specified bitmap. abstract intgetDurationMs()Gets the duration of the frame. abstract intgetWidth()Gets the width of the frame. abstract intgetHeight()Gets the height of the frame. abstract intgetXOffset()Gets the x-offset of the frame relative to the image canvas. abstract intgetYOffset()Gets the y-offset of the frame relative to the image canvas. -
-
Method Detail
-
dispose
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 notactually be freed until all associated instances AnimatedImage are disposed orfinalized as well.
-
renderFrame
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 atleast 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
-
getDurationMs
abstract int getDurationMs()
Gets the duration of the frame.
-
getWidth
abstract int getWidth()
Gets the width of the frame.
-
getHeight
abstract int getHeight()
Gets the height of the frame.
-
getXOffset
abstract int getXOffset()
Gets the x-offset of the frame relative to the image canvas.
-
getYOffset
abstract int getYOffset()
Gets the y-offset of the frame relative to the image canvas.
-
-
-
-