java.awt.image
Class IndexColorModel
java.lang.Object
|
+--java.awt.image.ColorModel
|
+--java.awt.image.IndexColorModel
Author:- C. Brian Jones (cbj@gnu.org)
IndexColorModel(int bits, int size, byte[] reds, byte[] greens, byte[] blues)
|
IndexColorModel(int bits, int size, byte[] reds, byte[] greens, byte[] blues, int trans)
|
IndexColorModel(int bits, int size, byte[] reds, byte[] greens, byte[] blues, byte[] alphas)
|
IndexColorModel(int bits, int size, byte[] cmap, int start, boolean hasAlpha)
|
IndexColorModel(int bits, int size, byte[] cmap, int start, boolean hasAlpha, int trans)
|
IndexColorModel
public IndexColorModel(int bits, int size, byte[] reds, byte[] greens, byte[] blues)
Each array much contain size
elements. For each
array, the i-th color is described by reds[i], greens[i],
blues[i], alphas[i], unless alphas is not specified, then all the
colors are opaque except for the transparent color.
Parameters:
IndexColorModel
public IndexColorModel(int bits, int size, byte[] reds, byte[] greens, byte[] blues, byte[] alphas)
Each array much contain size
elements. For each
array, the i-th color is described by reds[i], greens[i],
blues[i], alphas[i], unless alphas is not specified, then all the
colors are opaque except for the transparent color.
Parameters:
IndexColorModel
public IndexColorModel(int bits, int size, byte[] reds, byte[] greens, byte[] blues, int trans)
Each array much contain size
elements. For each
array, the i-th color is described by reds[i], greens[i],
blues[i], alphas[i], unless alphas is not specified, then all the
colors are opaque except for the transparent color.
Parameters:
IndexColorModel
public IndexColorModel(int bits, int size, byte[] cmap, int start, boolean hasAlpha)
Each array much contain size
elements. For each
array, the i-th color is described by reds[i], greens[i],
blues[i], alphas[i], unless alphas is not specified, then all the
colors are opaque except for the transparent color.
Parameters:
IndexColorModel
public IndexColorModel(int bits, int size, byte[] cmap, int start, boolean hasAlpha, int trans)
Each array much contain size
elements. For each
array, the i-th color is described by reds[i], greens[i],
blues[i], alphas[i], unless alphas is not specified, then all the
colors are opaque except for the transparent color.
Parameters:
getAlpha
public final int getAlpha(int pixel)
Get the alpha component of the given pixel.
Parameters:
getAlphas
public final void getAlphas(byte[] a)
Parameters:
getBlue
public final int getBlue(int pixel)
Get the blue component of the given pixel.
Parameters:
getBlues
public final void getBlues(byte[] b)
Parameters:
getGreen
public final int getGreen(int pixel)
Get the green component of the given pixel.
Parameters:
getGreens
public final void getGreens(byte[] g)
Parameters:
getMapSize
public final int getMapSize()
getRGB
public final int getRGB(int pixel)
Get the RGB color value of the given pixel using the default
RGB color model.
Parameters:
getRed
public final int getRed(int pixel)
Get the red component of the given pixel.
Parameters:
getReds
public final void getReds(byte[] r)
Parameters:
getTransparentPixel
public final int getTransparentPixel()
Get the index of the transparent color in this color model
size
elements. For each array, the i-th color is described by reds[i], greens[i], blues[i], alphas[i], unless alphas is not specified, then all the colors are opaque except for the transparent color.