|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.newdawn.slick.ImageBuffer
public class ImageBuffer
A utility for creating images from pixel operations
Expected usage is:
ImageBuffer buffer = new ImageBuffer(320,200);
buffer.setRGBA(100,100,50,50,20,255);
..
Image image = buffer.getImage();
Constructor Summary | |
---|---|
ImageBuffer(int width,
int height)
|
Method Summary | |
---|---|
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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ImageBuffer(int width, int height)
width
- height
- Method Detail |
---|
public byte[] getRGBA()
public int getDepth()
ImageData
getDepth
in interface ImageData
ImageData.getDepth()
public int getHeight()
ImageData
getHeight
in interface ImageData
ImageData.getHeight()
public int getTexHeight()
ImageData
getTexHeight
in interface ImageData
ImageData.getTexHeight()
public int getTexWidth()
ImageData
getTexWidth
in interface ImageData
ImageData.getTexWidth()
public int getWidth()
ImageData
getWidth
in interface ImageData
ImageData.getWidth()
public java.nio.ByteBuffer getImageBufferData()
ImageData
getImageBufferData
in interface ImageData
ImageData.getImageBufferData()
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->255)g
- The green component to set (0->255)b
- The blue component to set (0->255)a
- The alpha component to set (0->255)public Image getImage()
public Image getImage(int filter)
filter
- The filtering method to use when scaling this image
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |