org.jtgl.image
Class ImageMatrix
java.lang.Object
org.jtgl.image.ImageMatrix
public class ImageMatrix
- extends java.lang.Object
Represents a group of equal sized images arranged in a 2D Matrix within a single big source image.
This class serves as an access point for Sprites and TileSets (see TiledSurface class)
- Author:
- Manuel Polo (manuel_polo at yahoo dot es)
- See Also:
TiledSurface
Constructor Summary |
ImageMatrix(JTGLImage imageSource,
int frameWidth)
Creates a new instance of ImageMatrix
suited for square dimensions |
ImageMatrix(JTGLImage imageSource,
int frameWidth,
int frameHeight)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ImageMatrix
public ImageMatrix(JTGLImage imageSource,
int frameWidth,
int frameHeight)
ImageMatrix
public ImageMatrix(JTGLImage imageSource,
int frameWidth)
- Creates a new instance of ImageMatrix
suited for square dimensions
getImageWidth
public int getImageWidth()
getImageHeight
public int getImageHeight()
getNumImages
public int getNumImages()
getNumHImages
public int getNumHImages()
getNumVImages
public int getNumVImages()
draw
public void draw(JTGLGraphics g,
int x,
int y,
int imageIndex)
- Draw a single image located by
imageIndex
at location (x,y)
draw
public void draw(JTGLGraphics g,
int x,
int y,
int offsetX,
int offsetY,
int imageIndex)