Java java.awt.image DirectColorModel fields, constructors, methods, implement or subclass

Example usage for Java java.awt.image DirectColorModel fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for java.awt.image DirectColorModel.

The text is from its open source code.

Constructor

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.
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.

Method

SampleModelcreateCompatibleSampleModel(int w, int h)
Creates a SampleModel with the specified width and height that has a data layout compatible with this ColorModel .
intgetAlpha(int pixel)
Returns the alpha component for the specified pixel, scaled from 0 to 255.
intgetAlpha(Object inData)
Returns the alpha component for the specified pixel, scaled from 0 to 255.
intgetAlphaMask()
Returns the mask indicating which bits in an int pixel representation contain the alpha component.
intgetBlueMask()
Returns the mask indicating which bits in an int pixel representation contain the blue color component.
int[]getComponents(int pixel, int[] components, int offset)
Returns an array of unnormalized color/alpha components given a pixel in this ColorModel .
int[]getComponents(Object pixel, int[] components, int offset)
Returns an array of unnormalized color/alpha components given a pixel in this ColorModel .
intgetDataElement(int[] components, int offset)
Returns a pixel value represented as an int in this ColorModel , given an array of unnormalized color/alpha components.
intgetGreenMask()
Returns the mask indicating which bits in an int pixel representation contain the green color component.
intgetNumComponents()
Returns the number of components, including alpha, in this ColorModel .
intgetPixelSize()
Returns the number of bits per pixel described by this ColorModel .
intgetRedMask()
Returns the mask indicating which bits in an int pixel representation contain the red color component.
booleanhasAlpha()
Returns whether or not alpha is supported in this ColorModel .