Interface MapPalette
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionintargb(byte pixel) Returns the color the client draws a pixel with.byteclosest(int rgb) Finds the pixel whose color is the closest to a color, as the eye perceives it.byteFinds the pixel whose color is the closest to a color, as the eye perceives it.color(byte pixel) Returns the base color of a pixel,MapColor.NONEwhen it is transparent.booleanisTransparent(byte pixel) Returns whether the client draws a pixel transparent.bytePacks a color in its normal shade into a pixel.bytePacks a color and a shade into a pixel.shade(byte pixel) Returns the shade of a pixel.
-
Field Details
-
TRANSPARENT
static final byte TRANSPARENTThe transparent pixel. A canvas starts filled with it.- See Also:
-
-
Method Details
-
pixel
Packs a color and a shade into a pixel.- Parameters:
color- the colorshade- the shade- Returns:
- the pixel,
TRANSPARENTwhen the color isMapColor.NONE - Since:
- 0.1.0
-
pixel
Packs a color in its normal shade into a pixel.- Parameters:
color- the color- Returns:
- the pixel,
TRANSPARENTwhen the color isMapColor.NONE - Since:
- 0.1.0
-
color
Returns the base color of a pixel,MapColor.NONEwhen it is transparent.- Parameters:
pixel- the pixel- Returns:
- the base color of a pixel,
MapColor.NONEwhen it is transparent - Since:
- 0.1.0
-
shade
Returns the shade of a pixel.- Parameters:
pixel- the pixel- Returns:
- the shade of a pixel
- Since:
- 0.1.0
-
isTransparent
boolean isTransparent(byte pixel) Returns whether the client draws a pixel transparent.- Parameters:
pixel- the pixel- Returns:
- whether the client draws a pixel transparent
- Since:
- 0.1.0
-
argb
int argb(byte pixel) Returns the color the client draws a pixel with.- Parameters:
pixel- the pixel- Returns:
- the color as
0xAARRGGBB: opaque, or0when the pixel is transparent - Since:
- 0.1.0
-
closest
byte closest(int rgb) Finds the pixel whose color is the closest to a color, as the eye perceives it.- Parameters:
rgb- a color as0xRRGGBB; an alpha channel is ignored- Returns:
- the closest opaque pixel
- Since:
- 0.1.0
-
closest
Finds the pixel whose color is the closest to a color, as the eye perceives it.- Parameters:
color- the color; an alpha channel is ignored- Returns:
- the closest opaque pixel
- Since:
- 0.1.0
-