java.awt.image
Class DirectColorModel
java.lang.Object
|
+--java.awt.image.ColorModel
|
+--java.awt.image.PackedColorModel
|
+--java.awt.image.DirectColorModel
Authors:- Rolf W. Rasmussen <rolfwr@ii.uib.no>
- C. Brian Jones (cbj@gnu.org)
- Mark Benvenuto (mcb54@columbia.edu)
DirectColorModel(int pixelBits, int rmask, int gmask, int bmask)
|
DirectColorModel(int pixelBits, int rmask, int gmask, int bmask, int amask)
|
DirectColorModel(java.awt.color.ColorSpace cspace, int pixelBits, int rmask, int gmask, int bmask, int amask, boolean isAlphaPremultiplied, int transferType)
|
java.awt.image.ColorModel | coerceData(java.awt.image.WritableRaster raster, boolean isAlphaPremultiplied)
|
java.awt.image.WritableRaster | createCompatibleWritableRaster(int w, int h)
|
int | getAlpha(int pixel)
|
int | getAlpha(java.lang.Object inData)
|
int | getAlphaMask()
|
int | getBlue(int pixel)
|
int | getBlue(java.lang.Object inData)
|
int | getBlueMask()
|
int[] | getComponents(int pixel, int[] components, int offset)
|
int[] | getComponents(java.lang.Object pixel, int[] components, int offset)
|
int | getDataElement(int[] components, int offset)
|
java.lang.Object | getDataElements(int rgb, java.lang.Object pixel)
|
java.lang.Object | getDataElements(int[] components, int offset, java.lang.Object obj)
|
int | getGreen(int pixel)
|
int | getGreen(java.lang.Object inData)
|
int | getGreenMask()
|
int | getRGB(int pixel)
|
int | getRGB(java.lang.Object inData)
|
int | getRed(int pixel)
|
int | getRed(java.lang.Object inData)
|
int | getRedMask()
|
boolean | isCompatibleRaster(java.awt.image.Raster raster)
|
java.lang.String | toString()
|
DirectColorModel
public DirectColorModel(int pixelBits, int rmask, int gmask, int bmask)
For the color model created with this constructor the pixels
will have fully opaque alpha components with a value of 255.
Each mask should describe a fully contiguous set of bits in the
most likely order of alpha, red, green, blue from the most significant
byte to the least significant byte.
Parameters:
DirectColorModel
public DirectColorModel(int pixelBits, int rmask, int gmask, int bmask, int amask)
For the color model created with this constructor the pixels
will have fully opaque alpha components with a value of 255.
Each mask should describe a fully contiguous set of bits in the
most likely order of red, green, blue from the most significant
byte to the least significant byte.
Parameters:
DirectColorModel
public DirectColorModel(java.awt.color.ColorSpace cspace, int pixelBits, int rmask, int gmask, int bmask, int amask, boolean isAlphaPremultiplied, int transferType)
Parameters:
coerceData
public ColorModel coerceData(java.awt.image.WritableRaster raster, boolean isAlphaPremultiplied)
Parameters:
createCompatibleWritableRaster
public final WritableRaster createCompatibleWritableRaster(int w, int h)
Parameters:
getAlpha
public final int getAlpha(int pixel)
Get the alpha component of the given pixel.
Parameters:
getAlpha
public int getAlpha(java.lang.Object inData)
Parameters:
getAlphaMask
public final int getAlphaMask()
getBlue
public final int getBlue(int pixel)
Get the blue component of the given pixel.
Parameters:
getBlue
public int getBlue(java.lang.Object inData)
Parameters:
getBlueMask
public final int getBlueMask()
getComponents
public final int[] getComponents(int pixel, int[] components, int offset)
Fills an array with the unnormalized component samples from a
pixel value. I.e. decompose the pixel, but not perform any
color conversion.
Parameters:
getComponents
public final int[] getComponents(java.lang.Object pixel, int[] components, int offset)
Parameters:
getDataElement
public int getDataElement(int[] components, int offset)
Parameters:
getDataElements
public Object getDataElements(int[] components, int offset, java.lang.Object obj)
Parameters:
getDataElements
public Object getDataElements(int rgb, java.lang.Object pixel)
Converts a normalized pixel int value in the sRGB color
space to an array containing a single pixel of the color space
of the color model.
This method performs the inverse function of
getRGB(Object inData)
.
Parameters:
Returns:
- array of transferType containing a single pixel. The
pixel should be encoded in the natural way of the color model.
See Also:
getGreen
public final int getGreen(int pixel)
Get the green component of the given pixel.
Parameters:
getGreen
public int getGreen(java.lang.Object inData)
Parameters:
getGreenMask
public final int getGreenMask()
getRGB
public final int getRGB(int pixel)
Get the RGB color value of the given pixel using the default
RGB color model.
Parameters:
getRGB
public int getRGB(java.lang.Object inData)
Parameters:
getRed
public final int getRed(int pixel)
Get the red component of the given pixel.
Parameters:
getRed
public int getRed(java.lang.Object inData)
Parameters:
getRedMask
public final int getRedMask()
isCompatibleRaster
public boolean isCompatibleRaster(java.awt.image.Raster raster)
Parameters:
toString
public String toString()