public class Image extends LoadableResource
Modifier and Type | Field and Description |
---|---|
static ResourceList<Image> |
list |
static long |
size |
alias, path
Constructor and Description |
---|
Image(java.awt.image.BufferedImage image) |
Image(java.io.File path) |
Modifier and Type | Method and Description |
---|---|
void |
bind() |
void |
destroy() |
void |
draw(Graphics g,
int x,
int y) |
void |
draw(Graphics g,
int x,
int y,
int width,
int height) |
void |
draw(Graphics g,
int x,
int y,
int width,
int height,
int imgX,
int imgY,
int imgWidth,
int imgHeight) |
int |
getHeight() |
java.io.File |
getPath() |
int |
getRealHeight()
Returns the height of the texture loaded into video memory
|
int |
getRealWidth()
Returns the width of the texture loaded into video memory
|
int |
getWidth() |
void |
load() |
getAlias, setAlias
public static final ResourceList<Image> list
public static long size
public Image(java.io.File path) throws java.lang.Exception
java.lang.Exception
public Image(java.awt.image.BufferedImage image) throws java.lang.Exception
java.lang.Exception
public void load() throws java.lang.Exception
load
in class LoadableResource
java.lang.Exception
public void destroy() throws java.lang.Exception
destroy
in class LoadableResource
java.lang.Exception
public java.io.File getPath()
getPath
in class LoadableResource
public void draw(Graphics g, int x, int y, int width, int height)
public void draw(Graphics g, int x, int y, int width, int height, int imgX, int imgY, int imgWidth, int imgHeight)
public void draw(Graphics g, int x, int y)
public int getWidth()
public int getHeight()
public int getRealWidth()
public int getRealHeight()
public void bind()