|
||||||||||
| 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.
| Constructor Summary | |
|---|---|
Image(BufferedImage image)
Creates an image from the supplied source AWT image. |
|
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. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Image(URL image)
throws IOException
IOExceptionpublic Image(BufferedImage image)
public Image(Texture2D texture)
public Image(Texture2D texture,
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.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||