The DirectColorModel class provides a ColorModel that specifies a translation between pixels and alpha, red, green, and blue component values, where the color values are embedded directly within the pixel.
public class java.awt.image.DirectColorModel
extends java.awt.image.ColorModel {
// Constructors
public DirectColorModel (int bits, int redMask, int greenMask,
int blueMask);
public DirectColorModel (int bits, int redMask, int greenMask,
int blueMask,
int alphaMask);
// Instance Methods
public final int getAlpha (int pixel);
public final int getAlphaMask();
public final int getBlue (int pixel);
public final int getBlueMask();
public final int getGreen (int pixel);
public final int getGreenMask()
public final int getRed (int pixel);
public final int getRedMask();
public final int getRGB (int pixel);
}
The number of bits required per pixel of an image using this model.
The location of the red component of a pixel.
The location of the green component of a pixel.
The location of the blue component of a pixel.
If the mask bits are not contiguous or overlap.
Constructs a DirectColorModel object with the given size and color masks; the alpha (transparency) component is not used.
The number of bits required per pixel of an image using this model.
The location of the red component of a pixel.
The location of the green component of a pixel.
The location of the blue component of a pixel.
The location of the alpha component of a pixel.
If the mask bits are not contiguous or overlap.
Constructs a DirectColorModel object with the given size and color masks.
A pixel encoded with this ColorModel.
The current alpha setting of the pixel.
ColorModel.getAlpha(int)
The current alpha mask setting of the color model.
A pixel encoded with this ColorModel.
The current blue setting of the pixel.
ColorModel.getBlue(int)
The current blue mask setting of the color model.
A pixel encoded with this ColorModel.
The current green setting of the pixel.
ColorModel.getGreen(int)
The current green mask setting of the color model.
A pixel encoded with this ColorModel.
The current red setting of the pixel.
ColorModel.getRed(int)
The current red mask setting of the color model.
A pixel encoded with this ColorModel.
The current combined red, green, and blue settings of the pixel.
ColorModel.getRGB(int)
Gets the color of pixel in the default RGB color model.
ColorModel