|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.threerings.opengl.gui.Image
public class Image
Contains a texture and its dimensions.
| Field Summary | |
|---|---|
protected int |
_height
|
protected BufferedImage |
_image
|
protected static boolean |
_supportsNonPowerOfTwo
|
protected int |
_theight
|
protected int |
_twidth
|
protected TextureUnit[] |
_units
|
protected int |
_width
|
| Constructor Summary | |
|---|---|
|
Image(BufferedImage image)
Creates an image from the supplied source AWT image. |
protected |
Image(int width,
int height)
Helper constructor. |
|
Image(Texture2D texture)
Creates an image from an existing texture. |
|
Image(Texture2D texture,
int width,
int height)
Creates an image from an existing texture. |
|
Image(URL image)
Creates an image from the supplied source URL. |
| Method Summary | |
|---|---|
static void |
configureTexture(Texture2D texture)
Configures a texture for use as an image. |
int |
getHeight()
Returns the height of this image. |
Texture2D |
getTexture(Renderer renderer)
Returns a reference to the image texture, loading it if necessary. |
int |
getWidth()
Returns the width of this image. |
void |
load(Renderer renderer,
int format)
Loads the image into a texture (this is called automatically when first used and need only be called manually if a specific format is desired). |
void |
render(Renderer renderer,
int tx,
int ty,
Color4f color,
float alpha)
Renders this image at the specified coordinates in the specified color. |
void |
render(Renderer renderer,
int tx,
int ty,
float alpha)
Renders this image at the specified coordinates. |
void |
render(Renderer renderer,
int tx,
int ty,
int twidth,
int theight,
float alpha)
Renders this image at the specified coordinates, scaled to the specified size. |
void |
render(Renderer renderer,
int sx,
int sy,
int swidth,
int sheight,
int tx,
int ty,
float alpha)
Renders a region of this image at the specified coordinates. |
void |
render(Renderer renderer,
int sx,
int sy,
int swidth,
int sheight,
int tx,
int ty,
int twidth,
int theight,
Color4f color,
float alpha)
Renders a region of this image at the specified coordinates, scaled to the specified size, in the specified color. |
void |
render(Renderer renderer,
int sx,
int sy,
int swidth,
int sheight,
int tx,
int ty,
int twidth,
int theight,
float alpha)
Renders a region of this image at the specified coordinates, scaled to the specified size. |
protected void |
setTexture(Texture2D texture)
Sets the image texture. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected int _width
protected int _height
protected int _twidth
protected int _theight
protected BufferedImage _image
protected TextureUnit[] _units
protected static boolean _supportsNonPowerOfTwo
| Constructor Detail |
|---|
public Image(URL image)
throws IOException
IOExceptionpublic Image(BufferedImage image)
public Image(Texture2D texture)
public Image(Texture2D texture,
int width,
int height)
protected Image(int width,
int height)
| Method Detail |
|---|
public static void configureTexture(Texture2D texture)
public int getWidth()
public int getHeight()
public Texture2D getTexture(Renderer renderer)
public void render(Renderer renderer,
int tx,
int ty,
float alpha)
public void render(Renderer renderer,
int tx,
int ty,
Color4f color,
float alpha)
public void render(Renderer renderer,
int tx,
int ty,
int twidth,
int theight,
float alpha)
public void render(Renderer renderer,
int sx,
int sy,
int swidth,
int sheight,
int tx,
int ty,
float alpha)
public void render(Renderer renderer,
int sx,
int sy,
int swidth,
int sheight,
int tx,
int ty,
int twidth,
int theight,
float alpha)
public void render(Renderer renderer,
int sx,
int sy,
int swidth,
int sheight,
int tx,
int ty,
int twidth,
int theight,
Color4f color,
float alpha)
public void load(Renderer renderer,
int format)
format - the internal format to use for the texture, or -1 to use the default.protected void setTexture(Texture2D texture)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||