IndexColorModel.IndexColorModel
Class Overview | Class Members |
This Package |
All Packages
public IndexColorModel( int bits,
int size,
byte r[],
byte g[],
byte b[] )
Parameters
- bits
- The number of bits each pixel occupies.
- size
- The size of the color component arrays.
- r
- The array of red color components.
- g
- The array of green color components.
- b
- The array of blue color components.
Description
Constructs an IndexColorModel from the given arrays of red,
green, and blue components. Pixels described by this color
model will all have alpha components of 255 (fully opaque).
All of the arrays specifying the color components must have
at least the specified number of entries.
public IndexColorModel( int bits,
int size,
byte r[],
byte g[],
byte b[],
int trans )
Parameters
- bits
- The number of bits each pixel occupies.
- size
- The size of the color component arrays.
- r
- The array of red color components.
- g
- The array of green color components.
- b
- The array of blue color components.
- trans
- The index of the transparent pixel.
Description
Constructs an IndexColorModel from the given arrays of red,
green, and blue components. Pixels described by this color
model will all have alpha components of 255 (fully opaque),
except for the indicated transparent pixel. All of the arrays
specifying the color components must have at least the specified
number of entries.
public IndexColorModel( int bits,
int size,
byte r[],
byte g[],
byte b[],
byte a[] )
Parameters
- bits
- The number of bits each pixel occupies.
- size
- The size of the color component arrays.
- r
- The array of red color components.
- g
- The array of green color components.
- b
- The array of blue color components.
- a
- The array of alpha value components.
Description
Constructs an IndexColorModel from the given arrays of red,
green, blue and alpha components. All of the arrays specifying
the color components must have at least the specified number
of entries.
public IndexColorModel( int bits,
int size,
byte cmap[],
int start,
boolean hasalpha )
Parameters
- bits
- The number of bits each pixel occupies.
- size
- The size of the color component arrays.
- cmap
- The array of color components.
- start
- The starting offset of the first color component.
- hasalpha
- Indicates whether alpha values are contained in
the cmap array.
Description
Constructs an IndexColorModel from a single arrays of packed
red, green, blue and optional alpha components. The array
must have enough values in it to fill all of the needed
component arrays of the specified size.
public IndexColorModel( int bits,
int size,
byte cmap[],
int start,
boolean hasalpha,
int trans )
Parameters
- bits
- The number of bits each pixel occupies.
- size
- The size of the color component arrays.
- cmap
- The array of color components.
- start
- The starting offset of the first color component.
- hasalpha
- Indicates whether alpha values are contained in
the cmap array.
- trans
- The index of the fully transparent pixel.
Description
Constructs an IndexColorModel from a single arrays of packed
red, green, blue and optional alpha components. The specified
transparent index represents a pixel which will be considered
entirely transparent regardless of any alpha value specified
for it. The array must have enough values in it to fill all
of the needed component arrays of the specified size.