|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectrlgamekit.map.display.ColorCodes
public class ColorCodes
Color codes to be used with the rendering backends. At the moment only the ASCIITilePainter makes use of these.
ASCIITilePainter| Field Summary | |
|---|---|
static int |
BLACK
|
static int |
BLUE
|
static int |
CYAN
|
static int |
DARKGRAY
|
static int |
GREEN
|
static int |
LEMONGREEN
|
static int |
LIGHTGRAY
|
static int |
MAGENTA
|
static int |
ORANGE
|
static int |
PURPLE
|
static int |
RED
|
static int[] |
rgb
|
static int |
SEAGREEN
|
static int |
TORQUOISE
|
static int |
VIOLET
|
static int |
WHITE
|
static int |
YELLOW
|
| Constructor Summary | |
|---|---|
ColorCodes()
|
|
| Method Summary | |
|---|---|
static int |
getColor(int tileNo)
Color codes are encoded in the upper 16 bit of the tile numbers. |
static char |
getColorCharacter(int tileNo)
Get the describing character (identifier) for a color, e.g. |
static int |
getColorCode(char colorChar)
Parse a configuration code into an color value. |
static int |
getColorIndex(int tileNo)
Color indices are encoded in the upper 16 bit of the tile numbers. |
static java.awt.Color |
getTileColor(int tileNo)
Get the Color for the color index encoded in the upper 16 bit of the tile number. |
static void |
setColor(int index,
java.awt.Color color)
Set one of the colors to a new color. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int[] rgb
public static final int WHITE
public static final int RED
public static final int GREEN
public static final int BLUE
public static final int YELLOW
public static final int MAGENTA
public static final int CYAN
public static final int ORANGE
public static final int VIOLET
public static final int LEMONGREEN
public static final int SEAGREEN
public static final int PURPLE
public static final int TORQUOISE
public static final int LIGHTGRAY
public static final int DARKGRAY
public static final int BLACK
| Constructor Detail |
|---|
public ColorCodes()
| Method Detail |
|---|
public static void setColor(int index,
java.awt.Color color)
index - The index of the color to replace.color - The new color.public static int getColor(int tileNo)
tileNo - Combined tile number and color code.
public static int getColorIndex(int tileNo)
tileNo - Combined tile number and color code.
public static java.awt.Color getTileColor(int tileNo)
tileNo - Combined tile number and color code.
public static int getColorCode(char colorChar)
colorChar - The color identifier
public static char getColorCharacter(int tileNo)
tileNo - Combined tile number and color code.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||