Changed MultiFrameImage around so that it retains total control over its
internal images and doesn't necessarily need to decode them into multiple images or even have actual images at all. This cleans things up and paves the way for our "trimmed" image support which is forthcoming. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1335 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
//
|
||||
// $Id: MultiFrameImage.java,v 1.1 2001/08/14 23:35:22 mdb Exp $
|
||||
// $Id: MultiFrameImage.java,v 1.2 2002/05/04 19:35:31 mdb Exp $
|
||||
|
||||
package com.threerings.media.sprite;
|
||||
|
||||
import java.awt.Graphics;
|
||||
import java.awt.Image;
|
||||
|
||||
/**
|
||||
@@ -17,7 +18,24 @@ public interface MultiFrameImage
|
||||
public int getFrameCount ();
|
||||
|
||||
/**
|
||||
* Returns the image for the specified frame index.
|
||||
* Returns the width of the specified frame image.
|
||||
*/
|
||||
public Image getFrame (int index);
|
||||
public int getWidth (int index);
|
||||
|
||||
/**
|
||||
* Returns the height of the specified frame image.
|
||||
*/
|
||||
public int getHeight (int index);
|
||||
|
||||
/**
|
||||
* Renders the specified frame into the specified graphics object at
|
||||
* the specified coordinates.
|
||||
*/
|
||||
public void paintFrame (Graphics g, int index, int x, int y);
|
||||
|
||||
/**
|
||||
* Returns true if the specified frame contains a non-transparent
|
||||
* pixel at the specified coordinates.
|
||||
*/
|
||||
public boolean hitTest (int index, int x, int y);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user