org.gljava.opengl
public class Sprite extends Object
Version: $Id: Sprite.java,v 1.4 2005/02/10 04:18:56 ivan_ganza Exp $
| Field Summary | |
|---|---|
| protected int | height |
| protected Texture | texture |
| protected int | width |
| Constructor Summary | |
|---|---|
| Sprite() | |
| Sprite(Texture t)
Create a new sprite from given Texture
| |
| Sprite(GL gl, String texturePath)
Create a new sprite from the image given at texturePath
| |
| Sprite(GL gl, URL url)
Create a new sprite from the image given at url
| |
| Sprite(GL gl, String resourceName, boolean resource)
Create a new sprite from the image found at the given resourceName
| |
| Method Summary | |
|---|---|
| void | draw(GL gl, float x, float y)
Draw the sprite at the specified location
|
| int | getHeight()
Get the height of this sprite in pixels
|
| int | getWidth()
Get the width of this sprite in pixels
|
| void | setHeight(int h) |
| void | setWidth(int w) |
Parameters: t a Texture value
Parameters: gl a GL value texturePath a String value
Throws: IOException if an error occurs
Parameters: gl a GL value url an URL value
Throws: IOException if an error occurs
Parameters: gl a GL value resourceName a String value resource a boolean value
Throws: IOException if an error occurs
Parameters: x The x location at which to draw this sprite y The y location at which to draw this sprite
Returns: The height of this sprite in pixels
Returns: The width of this sprite in pixels