public class MapColorSpaceData extends Object implements Cloneable
Constructor and Description |
---|
MapColorSpaceData() |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clears all data, setting all colors to transparent
|
void |
clearRGBData()
Clears only the RGB data.
|
MapColorSpaceData |
clone() |
byte |
get(byte r,
byte g,
byte b)
Gets the map color code value for an rgb value
|
byte |
get(int index)
Gets the map color code for an rgb value
|
byte |
get(int r,
int g,
int b)
Gets the map color code value for an rgb value
|
Color |
getColor(byte code)
Gets a single map palette color
|
Color |
getColor(int index)
Gets a single map palette color
|
int |
getColorCount()
Gets the total number of colors that exist in this color space.
|
byte[] |
getRG(int b)
Gets all the red/green values for a single Blue color channel
|
void |
getRG(int b,
byte[] data)
Gets all the red/green values for a single Blue color channel
|
void |
readFrom(MapColorSpaceData data)
Sets all color data of this color space data to that from the input color space data
|
void |
set(int index,
byte code)
Sets the map color code for an rgb value
|
void |
set(int r,
int g,
int b,
byte code)
Sets the map color code value for an rgb value
|
void |
setColor(byte code,
Color color)
Sets a single map palette color
|
void |
setRG(int b,
byte[] data)
Sets all the red/green values for a single Blue color chanel
|
public final int getColorCount()
public final void clearRGBData()
set(int, byte)
on all RGB colors.public final void clear()
public void readFrom(MapColorSpaceData data)
data
- to setpublic final void setColor(byte code, Color color)
code
- of the colorcolor
- to set topublic final Color getColor(int index)
index
- of the colorpublic final Color getColor(byte code)
code
- of the colorpublic final void set(int r, int g, int b, byte code)
r
- componentg
- componentb
- componentcode
- to set topublic final byte get(byte r, byte g, byte b)
r
- componentg
- componentb
- componentpublic final byte get(int r, int g, int b)
r
- componentg
- componentb
- componentpublic final void set(int index, byte code)
index
- rgb compound valuecode
- to set topublic final byte get(int index)
index
- rgb compound valuepublic final byte[] getRG(int b)
b
- blue channelpublic final void getRG(int b, byte[] data)
b
- blue channeldata
- to getpublic final void setRG(int b, byte[] data)
b
- blue channeldata
- to setpublic MapColorSpaceData clone()
Copyright © 2019. All rights reserved.