public class HAMColorModel
extends java.awt.image.DirectColorModel
Modifier and Type | Field and Description |
---|---|
static int |
HAM6 |
static int |
HAM8 |
protected int |
HAMType |
protected int |
map_size |
protected boolean |
opaque |
protected int[] |
rgb |
Constructor and Description |
---|
HAMColorModel(int aHAMType,
int size,
byte[] r,
byte[] g,
byte[] b,
boolean isOCS)
Creates a new HAM Color model using the specified base colors.
|
HAMColorModel(int aHAMType,
int size,
int[] rgb,
boolean isOCS)
Creates a new HAM Color model using the specified base colors.
|
Modifier and Type | Method and Description |
---|---|
void |
getBlues(byte[] b)
Copies the array of blue color components into the given array.
|
int |
getDepth()
Returns the number of planes required to represent
this HAMColorModel in a Bitmap.
|
void |
getGreens(byte[] g)
Copies the array of green color components into the given array.
|
int |
getHAMType()
Returns the HAM Type of this HAMColorModel: HAM8 or HAM6.
|
int |
getMapSize()
Returns the size of the color component arrays in this IndexColorModel.
|
void |
getReds(byte[] r)
Copies the array of red color components into the given array.
|
void |
getRGBs(int[] rgbs)
Copies the array of color components into the given array.
|
protected void |
setRGBs(int size,
byte[] r,
byte[] g,
byte[] b,
byte[] a)
Sets the HAM base colors.
|
coerceData, createCompatibleWritableRaster, getAlpha, getAlpha, getAlphaMask, getBlue, getBlue, getBlueMask, getComponents, getComponents, getDataElement, getDataElements, getDataElements, getGreen, getGreen, getGreenMask, getRed, getRed, getRedMask, getRGB, getRGB, isCompatibleRaster, toString
createCompatibleSampleModel, equals, getAlphaRaster, getMask, getMasks, isCompatibleSampleModel
finalize, getColorSpace, getComponentSize, getComponentSize, getDataElement, getDataElements, getNormalizedComponents, getNormalizedComponents, getNumColorComponents, getNumComponents, getPixelSize, getRGBdefault, getTransferType, getTransparency, getUnnormalizedComponents, hasAlpha, hashCode, isAlphaPremultiplied
public static final int HAM6
public static final int HAM8
protected int HAMType
protected int map_size
protected boolean opaque
protected int[] rgb
public HAMColorModel(int aHAMType, int size, byte[] r, byte[] g, byte[] b, boolean isOCS)
aHAMType
- Type, must be HAM6 or HAM 8.size
- The size of the color palette.r
- The red colors as 8 bit or as 4 bit values.g
- The green colors as 8 bit or as 4 bit values.b
- The blue colors as 8 bit or as 4 bit values.isOCS
- Set this to true if the colors are 4 bit values.public HAMColorModel(int aHAMType, int size, int[] rgb, boolean isOCS)
aHAMType
- Type, must be HAM6 or HAM 8.size
- The size of the color palette.rgb
- The rgb colors.isOCS
- Set this to true if the colors are 12 bit precision only.public int getHAMType()
public int getDepth()
protected void setRGBs(int size, byte[] r, byte[] g, byte[] b, byte[] a)
size
- The size of the color palette.r
- The red colors as 8 bit values.g
- The green colors as 8 bit values.b
- The blue colors as 8 bit values.a
- The alpha channels as 8 bit values.public final void getReds(byte[] r)
public final void getGreens(byte[] g)
public final void getBlues(byte[] b)
public final void getRGBs(int[] rgbs)
public final int getMapSize()