|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--hotline.iconlib.HLIconData
data structure where all the important icon information data is stored
| Constructor Summary | |
HLIconData()
|
|
| Method Summary | |
boolean |
add(byte red,
byte green,
byte blue)
add a new RGB entry to the dat-field |
boolean |
add(hotline.iconlib.HLRGB h)
add a new RGB value of a HLRGB object to the data-field |
boolean |
add(int RGB)
add a new RGB entry to the data-field |
hotline.iconlib.HLRGB |
get(int index)
get the desired HLRGB object |
int |
getARGB(int index)
get the desired RGB as an integer, including the alpha channel |
int[] |
getARGBField()
get RGB data including the alpha channel, whereas the color-byte-order is: Alpha|Red|Green|Blue |
byte |
getBlue(int index)
returns the blue component of the RGB entry specified by index |
int[] |
getData()
get access to the int[] data field |
byte |
getGreen(int index)
returns the green component of the RGB entry specified by index |
int |
getHeight()
returns the icon height in pixel |
byte[][] |
getPalette()
get access to the palette as a two dimensional field, where the first dimension is the entry number and the second dimension has red, green and blue at indices 0, 1, 2 this example extracts the red value from the 16th palette color: ... |
int |
getPalLengthBytes()
returns the palette length in bytes, note: In order to receive the number of palette entries you need to divide this value by 4 (four) since they are aligned to 4-byte-boundaries, or you can simply use the getPalLengthLW() method |
int |
getPalLengthLW()
returns the palette length in longwords, identical to the number of palette entries |
byte[] |
getRawData()
get access to raw data: all pixels are stored as 1 byte entries, their values indicate their palette color entry |
byte |
getRed(int index)
returns the red component of the RGB entry specified by index |
int |
getRGB(int index)
get the desired RGB as an integer |
int[] |
getRGBField()
get RGB data , whereas the color-byte-order is: *|Red|Green|Blue |
int |
getTransparency()
Returns the color used for transparency as RGB in big endian format. |
int |
getWidth()
returns the icon width in pixel |
int |
getWidthInBytes()
returns the icon width in bytes |
void |
malloc(int size)
allocate the memory necessary for the HLRGB objects |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public HLIconData()
| Method Detail |
public void malloc(int size)
size - number of HLRGB units for which the memory should be allocatedpublic boolean add(hotline.iconlib.HLRGB h)
h - HLRGB object to be added
HLRGBpublic boolean add(int RGB)
RGB - int with red in bits 23-16, green 15-8, blue 7-0
public boolean add(byte red,
byte green,
byte blue)
public hotline.iconlib.HLRGB get(int index)
index - index of the HLRGB object in the dat-field, starting at index 0
public int getRGB(int index)
index - index of the RGB value in the data-field, starting at index 0
public int getARGB(int index)
index - index of the RGB value in the data-field, starting at index 0
public int[] getARGBField()
public int[] getRGBField()
public int getWidth()
public int getHeight()
public int getWidthInBytes()
public int getPalLengthBytes()
public int getPalLengthLW()
public int getTransparency()
public byte[][] getPalette()
...
HLIconData hlid = new HLIconData();
...
byte red = hlid.getPalette()[15][0];
...
public byte getRed(int index)
index - index in the data-field, starting at 0
public byte getGreen(int index)
index - index in the data-field, starting at 0
public byte getBlue(int index)
index - index in the data-field, starting at 0
public byte[] getRawData()
public int[] getData()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||