API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.awt.image. DirectColorModel View Source
Author(s)
Since
Version
10 Feb 1997
Serial
Hierarchy
 Object
      ColorModel
          PackedColorModel
              DirectColorModel
Implements
Subclasses
Description
public class DirectColorModel
  The DirectColorModel class is a ColorModel class that works with pixel values that represent RGB color and alpha information as separate samples and that pack all samples for a single pixel into a single int, short, or byte quantity.
Constructors
public DirectColorModel (ColorSpace space, int bits, int rmask, int gmask, int bmask, int amask, boolean isAlphaPremultiplied, int transferType)
  Constructs a DirectColorModel from the specified parameters.
public DirectColorModel (int bits, int rmask, int gmask, int bmask)
  Constructs a DirectColorModel from the specified masks that indicate which bits in an int pixel representation contain the red, green and blue color samples.
public DirectColorModel (int bits, int rmask, int gmask, int bmask, int amask)
  Constructs a DirectColorModel from the specified masks that indicate which bits in an int pixel representation contain the red, green and blue color samples and the alpha sample, if present.
Methods
Hide/Show inherited methods
publicfinal ColorModel coerceData (WritableRaster raster, boolean isAlphaPremultiplied) [Overrides ColorModel]
  Forces the raster data to match the state specified in the isAlphaPremultiplied variable, assuming the data is currently correctly described by this ColorModel.
public SampleModel createCompatibleSampleModel (int w, int h) [Inherited From PackedColorModel]
  Creates a SampleModel with the specified width and height that has a data layout compatible with this ColorModel.
publicfinal WritableRaster createCompatibleWritableRaster (int w, int h) [Overrides ColorModel]
  Creates a WritableRaster with the specified width and height that has a data layout (SampleModel) compatible with this ColorModel.
public boolean equals (Object obj) [Inherited From PackedColorModel]
  Tests if the specified Object is an instance of PackedColorModel and equals this PackedColorModel.
public void finalize () [Inherited From ColorModel]
Disposes of system resources associated with this ColorModel once this ColorModel is no longer referenced.
publicfinal int getAlpha (int pixel) [Specified in ColorModel]
  Returns the alpha component for the specified pixel, scaled from 0 to 255.
public int getAlpha (Object inData) [Overrides ColorModel]
  Returns the alpha component for the specified pixel, scaled from 0 to 255.
publicfinal int getAlphaMask ()
  Returns the mask indicating which bits in an int pixel representation contain the alpha component.
public WritableRaster getAlphaRaster (WritableRaster raster) [Inherited From PackedColorModel]
  Returns a WritableRaster representing the alpha channel of an image, extracted from the input WritableRaster.
publicfinal int getBlue (int pixel) [Specified in ColorModel]
  Returns the blue color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB.
public int getBlue (Object inData) [Overrides ColorModel]
  Returns the blue color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB.
publicfinal int getBlueMask ()
  Returns the mask indicating which bits in an int pixel representation contain the blue color component.
publicfinal ColorSpace getColorSpace () [Inherited From ColorModel]
  Returns the ColorSpace associated with this ColorModel.
publicfinal int getComponents (int pixel, int[] components, int offset) [Overrides ColorModel]
  Returns an array of unnormalized color/alpha components given a pixel in this ColorModel.
publicfinal int getComponents (Object pixel, int[] components, int offset) [Overrides ColorModel]
  Returns an array of unnormalized color/alpha components given a pixel in this ColorModel.
public int getComponentSize () [Inherited From ColorModel]
  Returns an array of the number of bits per color/alpha component.
public int getComponentSize (int componentIdx) [Inherited From ColorModel]
  Returns the number of bits for the specified color/alpha component.
public int getDataElement (float[] normComponents, int normOffset) [Inherited From ColorModel]
  Returns a pixel value represented as an int in this ColorModel, given an array of normalized color/alpha components.
public int getDataElement (int[] components, int offset) [Overrides ColorModel]
  Returns a pixel value represented as an int in this ColorModel, given an array of unnormalized color/alpha components.
public Object getDataElements (float[] normComponents, int normOffset, Object obj) [Inherited From ColorModel]
  Returns a data element array representation of a pixel in this ColorModel, given an array of normalized color/alpha components.
public Object getDataElements (int[] components, int offset, Object obj) [Overrides ColorModel]
  Returns a data element array representation of a pixel in this ColorModel, given an array of unnormalized color/alpha components.
public Object getDataElements (int rgb, Object pixel) [Overrides ColorModel]
  Returns a data element array representation of a pixel in this ColorModel, given an integer pixel representation in the default RGB color model.
pack-privatestatic int getDefaultTransferType (int pixel_bits) [Inherited From ColorModel]
pack-privatestatic byte getGray16TosRGB8LUT (ICC_ColorSpace grayCS) [Inherited From ColorModel]
pack-privatestatic byte getGray8TosRGB8LUT (ICC_ColorSpace grayCS) [Inherited From ColorModel]
publicfinal int getGreen (int pixel) [Specified in ColorModel]
  Returns the green color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB.
public int getGreen (Object inData) [Overrides ColorModel]
  Returns the green color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB.
publicfinal int getGreenMask ()
  Returns the mask indicating which bits in an int pixel representation contain the green color component.
pack-privatestatic short getLinearGray16ToOtherGray16LUT (ICC_ColorSpace grayCS) [Inherited From ColorModel]
pack-privatestatic byte getLinearGray16ToOtherGray8LUT (ICC_ColorSpace grayCS) [Inherited From ColorModel]
pack-privatestatic byte getLinearRGB16TosRGB8LUT () [Inherited From ColorModel]
pack-privatestatic byte getLinearRGB8TosRGB8LUT () [Inherited From ColorModel]
publicfinal int getMask (int index) [Inherited From PackedColorModel]
  Returns the mask indicating which bits in a pixel contain the specified color/alpha sample.
publicfinal int getMasks () [Inherited From PackedColorModel]
  Returns a mask array indicating which bits in a pixel contain the color and alpha samples.
public float getNormalizedComponents (int[] components, int offset, float[] normComponents, int normOffset) [Inherited From ColorModel]
  Returns an array of all of the color/alpha components in normalized form, given an unnormalized component array.
public float getNormalizedComponents (Object pixel, float[] normComponents, int normOffset) [Inherited From ColorModel]
  Returns an array of all of the color/alpha components in normalized form, given a pixel in this ColorModel.
public int getNumColorComponents () [Inherited From ColorModel]
  Returns the number of color components in this ColorModel.
public int getNumComponents () [Inherited From ColorModel]
  Returns the number of components, including alpha, in this ColorModel.
public int getPixelSize () [Inherited From ColorModel]
  Returns the number of bits per pixel described by this ColorModel.
publicfinal int getRed (int pixel) [Specified in ColorModel]
  Returns the red color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB.
public int getRed (Object inData) [Overrides ColorModel]
  Returns the red color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB.
publicfinal int getRedMask ()
  Returns the mask indicating which bits in an int pixel representation contain the red color component.
publicfinal int getRGB (int pixel) [Overrides ColorModel]
  Returns the color/alpha components of the pixel in the default RGB color model format.
public int getRGB (Object inData) [Overrides ColorModel]
  Returns the color/alpha components for the specified pixel in the default RGB color model format.
publicstatic ColorModel getRGBdefault () [Inherited From ColorModel]
  Returns a DirectColorModel that describes the default format for integer RGB values used in many of the methods in the AWT image interfaces for the convenience of the programmer.
pack-privatestatic short getsRGB8ToLinearRGB16LUT () [Inherited From ColorModel]
pack-privatestatic byte getsRGB8ToLinearRGB8LUT () [Inherited From ColorModel]
publicfinal int getTransferType () [Inherited From ColorModel]
  Returns the transfer type of this ColorModel.
public int getTransparency () [Inherited From ColorModel]
  Returns the transparency.
public int getUnnormalizedComponents (float[] normComponents, int normOffset, int[] components, int offset) [Inherited From ColorModel]
  Returns an array of all of the color/alpha components in unnormalized form, given a normalized component array.
publicfinal boolean hasAlpha () [Inherited From ColorModel]
  Returns whether or not alpha is supported in this ColorModel.
public int hashCode () [Inherited From ColorModel]
  Returns the hash code for this ColorModel.
publicfinal boolean isAlphaPremultiplied () [Inherited From ColorModel]
  Returns whether or not the alpha has been premultiplied in the pixel values to be translated by this ColorModel.
public boolean isCompatibleRaster (Raster raster) [Overrides ColorModel]
  Returns true if raster is compatible with this ColorModel and false if it is not.
public boolean isCompatibleSampleModel (SampleModel sm) [Inherited From PackedColorModel]
  Checks if the specified SampleModel is compatible with this ColorModel.
pack-privatestatic boolean isLinearGRAYspace (ColorSpace cs) [Inherited From ColorModel]
pack-privatestatic boolean isLinearRGBspace (ColorSpace cs) [Inherited From ColorModel]
pack-privatestatic void loadLibraries () [Inherited From ColorModel]
public String toString () [Overrides ColorModel]
  Returns a String that represents this DirectColorModel.
Fields
Hide/Show inherited fields
pack-private ColorSpace colorSpace [Inherited From ColorModel]
pack-private int colorSpaceType [Inherited From ColorModel]
pack-privatestatic Map g16Tos8Map [Inherited From ColorModel]
pack-privatestatic Map g8Tos8Map [Inherited From ColorModel]
pack-private boolean is_sRGB [Inherited From ColorModel]
pack-private boolean isAlphaPremultiplied [Inherited From ColorModel]
pack-privatestatic byte l16Tos8 [Inherited From ColorModel]
pack-privatestatic byte l8Tos8 [Inherited From ColorModel]
pack-privatestatic Map lg16Toog16Map [Inherited From ColorModel]
pack-privatestatic Map lg16Toog8Map [Inherited From ColorModel]
pack-private int maskArray [Inherited From PackedColorModel]
pack-private int maskOffsets [Inherited From PackedColorModel]
pack-private int maxBits [Inherited From ColorModel]
pack-private int nBits [Inherited From ColorModel]
pack-private int numColorComponents [Inherited From ColorModel]
pack-private int numComponents [Inherited From ColorModel]
protected int pixel_bits [Inherited From ColorModel]
The total number of bits in the pixel.
pack-privatestatic short s8Tol16 [Inherited From ColorModel]
pack-privatestatic byte s8Tol8 [Inherited From ColorModel]
pack-private float scaleFactors [Inherited From PackedColorModel]
pack-private boolean supportsAlpha [Inherited From ColorModel]
protected int transferType [Inherited From ColorModel]
Data type of the array used to represent pixel values.
pack-private int transparency [Inherited From ColorModel]
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar