public class ImageBuffer extends java.lang.Object implements ImageData
ImageBuffer buffer = new ImageBuffer(320,200);
buffer.setRGBA(100,100,50,50,20,255);
..
Image image = buffer.getImage();
Constructor and Description |
---|
ImageBuffer(int width,
int height) |
Modifier and Type | Method and Description |
---|---|
int |
getDepth()
Get the last bit depth read from a TGA
|
int |
getHeight()
Get the last height read from a TGA
|
Image |
getImage()
Get an image generated based on this buffer
|
Image |
getImage(int filter)
Get an image generated based on this buffer
|
java.nio.ByteBuffer |
getImageBufferData()
Get the store image
|
byte[] |
getRGBA()
Retrieve the raw data stored within the image buffer
|
int |
getTexHeight()
Get the ast required texture height for a loaded image
|
int |
getTexWidth()
Get the last required texture width for a loaded image
|
int |
getWidth()
Get the last width read from a TGA
|
void |
setRGBA(int x,
int y,
int r,
int g,
int b,
int a)
Set a pixel in the image buffer
|
public ImageBuffer(int width, int height)
width
- height
- public byte[] getRGBA()
public int getDepth()
ImageData
public int getHeight()
ImageData
public int getTexHeight()
ImageData
getTexHeight
in interface ImageData
public int getTexWidth()
ImageData
getTexWidth
in interface ImageData
public int getWidth()
ImageData
public java.nio.ByteBuffer getImageBufferData()
ImageData
getImageBufferData
in interface ImageData
public void setRGBA(int x, int y, int r, int g, int b, int a)
x
- The x position of the pixel to sety
- The y position of the pixel to setr
- The red component to set (0 to 255)g
- The green component to set (0 to 255)b
- The blue component to set (0 to 255)a
- The alpha component to set (0 to 255)public Image getImage()
public Image getImage(int filter)
filter
- The filtering method to use when scaling this image