|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.bukkit.map.MapPalette
public final class MapPalette
Represents the palette that map items use.
Field Summary | |
---|---|
static byte |
BLUE
|
static byte |
BROWN
|
static byte |
DARK_BROWN
|
static byte |
DARK_GRAY
|
static byte |
DARK_GREEN
|
static byte |
GRAY_1
|
static byte |
GRAY_2
|
static byte |
LIGHT_BROWN
|
static byte |
LIGHT_GRAY
|
static byte |
LIGHT_GREEN
|
static byte |
PALE_BLUE
|
static byte |
RED
|
static byte |
TRANSPARENT
The base color ranges. |
static byte |
WHITE
|
Method Summary | |
---|---|
static Color |
getColor(byte index)
Get the value of the given color in the palette. |
static byte[] |
imageToBytes(Image image)
Convert an Image to a byte[] using the palette. |
static byte |
matchColor(Color color)
Get the index of the closest matching color in the palette to the given color. |
static byte |
matchColor(int r,
int g,
int b)
Get the index of the closest matching color in the palette to the given color. |
static BufferedImage |
resizeImage(Image image)
Resize an image to 128x128. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final byte TRANSPARENT
public static final byte LIGHT_GREEN
public static final byte LIGHT_BROWN
public static final byte GRAY_1
public static final byte RED
public static final byte PALE_BLUE
public static final byte GRAY_2
public static final byte DARK_GREEN
public static final byte WHITE
public static final byte LIGHT_GRAY
public static final byte BROWN
public static final byte DARK_GRAY
public static final byte BLUE
public static final byte DARK_BROWN
Method Detail |
---|
public static BufferedImage resizeImage(Image image)
image
- The image to resize.
public static byte[] imageToBytes(Image image)
image
- The image to convert.
public static byte matchColor(int r, int g, int b)
r
- The red component of the color.b
- The blue component of the color.g
- The green component of the color.
public static byte matchColor(Color color)
color
- The Color to match.
public static Color getColor(byte index)
index
- The index in the palette.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |