Class java.awt.image.DirectColorModel
All Packages This Package Previous Next
Class java.awt.image.DirectColorModel
java.lang.Object
|
+----java.awt.image.ColorModel
|
+----java.awt.image.DirectColorModel
-
public class
DirectColorModel
-
extends ColorModel
A ColorModel class that specifies a translation from pixel values
to alpha, red, green, and blue color components for pixels which
have the color components embedded directly in the bits of the
pixel itself. This color model is similar to an X11 TrueColor
visual.
-
See Also:
-
ColorModel
-
Version:
-
1.9 09/08/95
-
Author:
-
Jim Graham
-
DirectColorModel(int, int, int, int)
-
Construct a DirectColorModel from the given masks specifying
which bits in the pixel contain the red, green and blue color
components.
-
DirectColorModel(int, int, int, int, int)
-
Construct a DirectColorModel from the given masks specifying
which bits in the pixel contain the alhpa, red, green and blue
color components.
-
getAlpha(int)
-
Return the alpha transparency value for the specified pixel in the
range 0-255.
-
getAlphaMask()
-
Return the mask indicating which bits in a pixel contain the alpha
transparency component.
-
getBlue(int)
-
Return the blue color compoment for the specified pixel in the
range 0-255.
-
getBlueMask()
-
Return the mask indicating which bits in a pixel contain the blue
color component.
-
getGreen(int)
-
Return the green color compoment for the specified pixel in the
range 0-255.
-
getGreenMask()
-
Return the mask indicating which bits in a pixel contain the green
color component.
-
getRed(int)
-
Return the red color compoment for the specified pixel in the
range 0-255.
-
getRedMask()
-
Return the mask indicating which bits in a pixel contain the red
color component.
DirectColorModel
public DirectColorModel(int bits,
int rmask,
int gmask,
int bmask)
-
Construct a DirectColorModel from the given masks specifying
which bits in the pixel contain the red, green and blue color
components. Pixels described by this color model will all
have alpha components of 255 (fully opaque). All of the bits
in each mask must be contiguous and fit in the specified number
of least significant bits of the integer.
DirectColorModel
public DirectColorModel(int bits,
int rmask,
int gmask,
int bmask,
int amask)
-
Construct a DirectColorModel from the given masks specifying
which bits in the pixel contain the alhpa, red, green and blue
color components. All of the bits in each mask must be contiguous
and fit in the specified number of least significant bits of the
integer.
getRedMask
public int getRedMask()
-
Return the mask indicating which bits in a pixel contain the red
color component.
getGreenMask
public int getGreenMask()
-
Return the mask indicating which bits in a pixel contain the green
color component.
getBlueMask
public int getBlueMask()
-
Return the mask indicating which bits in a pixel contain the blue
color component.
getAlphaMask
public int getAlphaMask()
-
Return the mask indicating which bits in a pixel contain the alpha
transparency component.
getRed
public int getRed(int pixel)
-
Return the red color compoment for the specified pixel in the
range 0-255.
-
Overrides:
-
getRed in class ColorModel
getGreen
public int getGreen(int pixel)
-
Return the green color compoment for the specified pixel in the
range 0-255.
-
Overrides:
-
getGreen in class ColorModel
getBlue
public int getBlue(int pixel)
-
Return the blue color compoment for the specified pixel in the
range 0-255.
-
Overrides:
-
getBlue in class ColorModel
getAlpha
public int getAlpha(int pixel)
-
Return the alpha transparency value for the specified pixel in the
range 0-255.
-
Overrides:
-
getAlpha in class ColorModel
All Packages This Package Previous Next