com.threerings.media.util
Interface MultiFrameImage

All Known Subinterfaces:
TrimmedMultiFrameImage
All Known Implementing Classes:
CompositedMaskedImage, CompositedMultiFrameImage, CompositedShadowImage, MultiFrameImageImpl, SingleFrameImageImpl, SingleTileImageImpl, TileMultiFrameImage, TileSubsetMultiFrameImage

public interface MultiFrameImage

The multi-frame image interface provides encapsulated access to a set of images that are used to create a multi-frame animation.


Method Summary
 int getFrameCount()
          Returns the number of frames in this multi-frame image.
 int getHeight(int index)
          Returns the height of the specified frame image.
 int getWidth(int index)
          Returns the width of the specified frame image.
 boolean hitTest(int index, int x, int y)
          Returns true if the specified frame contains a non-transparent pixel at the specified coordinates.
 void paintFrame(Graphics2D g, int index, int x, int y)
          Renders the specified frame into the specified graphics object at the specified coordinates.
 

Method Detail

getFrameCount

int getFrameCount()
Returns the number of frames in this multi-frame image.


getWidth

int getWidth(int index)
Returns the width of the specified frame image.


getHeight

int getHeight(int index)
Returns the height of the specified frame image.


paintFrame

void paintFrame(Graphics2D g,
                int index,
                int x,
                int y)
Renders the specified frame into the specified graphics object at the specified coordinates.


hitTest

boolean hitTest(int index,
                int x,
                int y)
Returns true if the specified frame contains a non-transparent pixel at the specified coordinates.