|
GF4J 0.9.4 Beta | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--gameframe.graphics.BitmapData
Represents the bitmap data loaded from a bitmap file.
Field Summary | |
static int |
NOT_USED
The value of any key color component if it is not used. |
Constructor Summary | |
BitmapData(int[] aPixels,
int width,
int height,
int pitch)
Constructs a bitmap data object that has the given parameters. |
|
BitmapData(int[] aPixels,
int width,
int height,
int pitch,
int[] aPalette)
Constructs a bitmap data object that has the given parameters. |
|
BitmapData(int[] aPixels,
int width,
int height,
int pitch,
int keyColorRed,
int keyColorGreen,
int keyColorBlue)
Constructs a bitmap data object that has the given parameters. |
|
BitmapData(int[] aPixels,
int width,
int height,
int pitch,
int keyColorRed,
int keyColorGreen,
int keyColorBlue,
int[] aPalette)
Constructs a bitmap data object that has the given parameters. |
Method Summary | |
BitmapData |
getCopy()
Returns a copy of the bitmap data. |
int |
getHeight()
Returns the height of the bitmap. |
int |
getKeyColorBlue()
Returns the red component of the keycolor. |
int |
getKeyColorGreen()
Returns the red component of the keycolor. |
int |
getKeyColorRed()
Returns the red component of the keycolor. |
int |
getNumBlueBits()
Returns the number of bits used for the red component in a pixel. |
int |
getNumGreenBits()
Returns the number of bits used for the red component in a pixel. |
int |
getNumRedBits()
Returns the number of bits used for the red component in a pixel. |
int[] |
getPalette()
Returns the palette array in the default color format. |
int |
getPitch()
Returns the number of pixels that needs to be travelled in the pixel array in order to step one pixel down in the bitmap. |
int[] |
getPixels()
Returns the pixel data array in the default color format. |
int |
getWidth()
Returns the width of the bitmap. |
boolean |
isKeyColourInUse()
Returns whether this bitmap data uses the keycolor or not. |
boolean |
isPaletted()
Returns whether this image data uses a palette or not. |
void |
setColourBits(int numRedBits,
int numGreenBits,
int numBlueBits)
Sets the colour bits (the number of bits used for each colour). |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int NOT_USED
Constructor Detail |
public BitmapData(int[] aPixels, int width, int height, int pitch)
aPixels
- The pixels in default colour format.width
- The width of the bitmap.height
- The height of the bitmap.pitch
- The number of pixels to step one pixel downwards.public BitmapData(int[] aPixels, int width, int height, int pitch, int keyColorRed, int keyColorGreen, int keyColorBlue)
aPixels
- The pixels in default colour format.width
- The width of the bitmap.height
- The height of the bitmap.pitch
- The number of pixels to step one pixel downwards.keyColorRed
- The alpha key colours red component value.keyColorGreen
- The alpha key colours green component value.keyColorBlue
- The alpha key colours blue component value.aPalette
- The palette array (in default RGB format).public BitmapData(int[] aPixels, int width, int height, int pitch, int[] aPalette)
aPixels
- The pixels in default colour format.width
- The width of the bitmap.height
- The height of the bitmap.pitch
- The number of pixels to step one pixel downwards.aPalette
- The palette array (in default RGB format).public BitmapData(int[] aPixels, int width, int height, int pitch, int keyColorRed, int keyColorGreen, int keyColorBlue, int[] aPalette)
aPixels
- The pixels in default colour format.width
- The width of the bitmap.height
- The height of the bitmap.pitch
- The number of pixels to step one pixel downwards.keyColorRed
- The alpha key colours red component value.keyColorGreen
- The alpha key colours green component value.keyColorBlue
- The alpha key colours blue component value.aPalette
- The palette array (in default RGB format).Method Detail |
public int[] getPixels()
public int getNumRedBits()
public int getNumGreenBits()
public int getNumBlueBits()
public void setColourBits(int numRedBits, int numGreenBits, int numBlueBits)
numRedBits
- The number of bits used for the red colour.numGreenBits
- The number of bits used for the green colour.numBlueBits
- The number of bits used for the blue colour.public final boolean isPaletted()
public int[] getPalette()
public int getWidth()
public int getPitch()
public int getHeight()
public int getKeyColorRed()
public int getKeyColorGreen()
public int getKeyColorBlue()
public boolean isKeyColourInUse()
public BitmapData getCopy()
|
GF4J 0.9.4 Beta | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |