<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<!--NewPage-->
<html>
<head>
<!-- Generated by javadoc on Wed Jul 28 01:21:15 GMT 1999 -->
<title>
  Class java.awt.image.DirectColorModel
</title>
</head>
<body>
<a name="_top_"></a>
<pre>
<a href="packages.html">All Packages</a>  <a href="tree.html">Class Hierarchy</a>  <a href="Package-java.awt.image.html">This Package</a>  <a href="java.awt.image.CropImageFilter.html#_top_">Previous</a>  <a href="java.awt.image.FilteredImageSource.html#_top_">Next</a>  <a href="AllNames.html">Index</a></pre>
<hr>
<h1>
  Class java.awt.image.DirectColorModel
</h1>
<pre>
<a href="java.lang.Object.html#_top_">java.lang.Object</a>
   |
   +----<a href="java.awt.image.ColorModel.html#_top_">java.awt.image.ColorModel</a>
           |
           +----java.awt.image.DirectColorModel
</pre>
<hr>
<dl>
  <dt> public class <b>DirectColorModel</b>
  <dt> extends <a href="java.awt.image.ColorModel.html#_top_">ColorModel</a>
</dl>
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.
 <p>Many of the methods in this class are final. This is because the
 underlying native graphics code makes  assumptions about the layout
 and operation of this class  and those assumptions are reflected in
 the implementations of the methods here that are marked final.  You
 can subclass this class  for other reaons,  but you cannot override
 or modify the behaviour of those methods.
<p>
<dl>
    <dt> <b>See Also:</b>
    <dd> <a href="java.awt.image.ColorModel.html#_top_">ColorModel</a>
</dl>
<hr>
<a name="index"></a>
<h2>
  <img src="images/constructor-index.gif" width=275 height=38 alt="Constructor Index">
</h2>
<dl>
  <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#DirectColorModel(int, int, int, int)"><b>DirectColorModel</b></a>(int, int, int, int)
  <dd>  Constructs a DirectColorModel from the given masks specifying
 which bits in the pixel contain the red, green and blue color
 components.
  <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#DirectColorModel(int, int, int, int, int)"><b>DirectColorModel</b></a>(int, int, int, int, int)
  <dd>  Constructs a DirectColorModel from the given masks specifying
 which bits in the pixel contain the alhpa, red, green and blue
 color components.
</dl>
<h2>
  <img src="images/method-index.gif" width=207 height=38 alt="Method Index">
</h2>
<dl>
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getAlpha(int)"><b>getAlpha</b></a>(int)
  <dd>  Return the alpha transparency value for the specified pixel in the
 range 0-255.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getAlphaMask()"><b>getAlphaMask</b></a>()
  <dd>  Returns the mask indicating which bits in a pixel contain the alpha
 transparency component.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getBlue(int)"><b>getBlue</b></a>(int)
  <dd>  Returns the blue color compoment for the specified pixel in the
 range 0-255.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getBlueMask()"><b>getBlueMask</b></a>()
  <dd>  Returns the mask indicating which bits in a pixel contain the blue
 color component.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getGreen(int)"><b>getGreen</b></a>(int)
  <dd>  Returns the green color compoment for the specified pixel in the
 range 0-255.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getGreenMask()"><b>getGreenMask</b></a>()
  <dd>  Returns the mask indicating which bits in a pixel contain the green
 color component.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getRed(int)"><b>getRed</b></a>(int)
  <dd>  Returns the red color compoment for the specified pixel in the
 range 0-255.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getRedMask()"><b>getRedMask</b></a>()
  <dd>  Returns the mask indicating which bits in a pixel contain the red
 color component.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getRGB(int)"><b>getRGB</b></a>(int)
  <dd>  Returns the color of the pixel in the default RGB color model.
</dl>
<a name="constructors"></a>
<h2>
  <img src="images/constructors.gif" width=231 height=38 alt="Constructors">
</h2>
<a name="DirectColorModel"></a>
<a name="DirectColorModel(int, int, int, int)"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
<b>DirectColorModel</b>
<pre>
 public DirectColorModel(int bits,
                         int rmask,
                         int gmask,
                         int bmask)
</pre>
<dl>
  <dd> Constructs 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.
<p>
</dl>
<a name="DirectColorModel(int, int, int, int, int)"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
<b>DirectColorModel</b>
<pre>
 public DirectColorModel(int bits,
                         int rmask,
                         int gmask,
                         int bmask,
                         int amask)
</pre>
<dl>
  <dd> Constructs 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.
<p>
</dl>
<a name="methods"></a>
<h2>
  <img src="images/methods.gif" width=151 height=38 alt="Methods">
</h2>
<a name="getRedMask()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getRedMask"><b>getRedMask</b></a>
<pre>
 public final int getRedMask()
</pre>
<dl>
  <dd> Returns the mask indicating which bits in a pixel contain the red
 color component.
<p>
</dl>
<a name="getGreenMask()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getGreenMask"><b>getGreenMask</b></a>
<pre>
 public final int getGreenMask()
</pre>
<dl>
  <dd> Returns the mask indicating which bits in a pixel contain the green
 color component.
<p>
</dl>
<a name="getBlueMask()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getBlueMask"><b>getBlueMask</b></a>
<pre>
 public final int getBlueMask()
</pre>
<dl>
  <dd> Returns the mask indicating which bits in a pixel contain the blue
 color component.
<p>
</dl>
<a name="getAlphaMask()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getAlphaMask"><b>getAlphaMask</b></a>
<pre>
 public final int getAlphaMask()
</pre>
<dl>
  <dd> Returns the mask indicating which bits in a pixel contain the alpha
 transparency component.
<p>
</dl>
<a name="getRed(int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getRed"><b>getRed</b></a>
<pre>
 public final int getRed(int pixel)
</pre>
<dl>
  <dd> Returns the red color compoment for the specified pixel in the
 range 0-255.
<p>
  <dd><dl>
    <dt> <b>Overrides:</b>
    <dd> <a href="java.awt.image.ColorModel.html#getRed(int)">getRed</a> in class <a href="java.awt.image.ColorModel.html#_top_">ColorModel</a>
  </dl></dd>
</dl>
<a name="getGreen(int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getGreen"><b>getGreen</b></a>
<pre>
 public final int getGreen(int pixel)
</pre>
<dl>
  <dd> Returns the green color compoment for the specified pixel in the
 range 0-255.
<p>
  <dd><dl>
    <dt> <b>Overrides:</b>
    <dd> <a href="java.awt.image.ColorModel.html#getGreen(int)">getGreen</a> in class <a href="java.awt.image.ColorModel.html#_top_">ColorModel</a>
  </dl></dd>
</dl>
<a name="getBlue(int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getBlue"><b>getBlue</b></a>
<pre>
 public final int getBlue(int pixel)
</pre>
<dl>
  <dd> Returns the blue color compoment for the specified pixel in the
 range 0-255.
<p>
  <dd><dl>
    <dt> <b>Overrides:</b>
    <dd> <a href="java.awt.image.ColorModel.html#getBlue(int)">getBlue</a> in class <a href="java.awt.image.ColorModel.html#_top_">ColorModel</a>
  </dl></dd>
</dl>
<a name="getAlpha(int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getAlpha"><b>getAlpha</b></a>
<pre>
 public final int getAlpha(int pixel)
</pre>
<dl>
  <dd> Return the alpha transparency value for the specified pixel in the
 range 0-255.
<p>
  <dd><dl>
    <dt> <b>Overrides:</b>
    <dd> <a href="java.awt.image.ColorModel.html#getAlpha(int)">getAlpha</a> in class <a href="java.awt.image.ColorModel.html#_top_">ColorModel</a>
  </dl></dd>
</dl>
<a name="getRGB(int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getRGB"><b>getRGB</b></a>
<pre>
 public final int getRGB(int pixel)
</pre>
<dl>
  <dd> Returns the color of the pixel in the default RGB color model.
<p>
  <dd><dl>
    <dt> <b>Overrides:</b>
    <dd> <a href="java.awt.image.ColorModel.html#getRGB(int)">getRGB</a> in class <a href="java.awt.image.ColorModel.html#_top_">ColorModel</a>
    <dt> <b>See Also:</b>
    <dd> <a href="java.awt.image.ColorModel.html#getRGBdefault">getRGBdefault</a>
  </dl></dd>
</dl>
<hr>
<pre>
<a href="packages.html">All Packages</a>  <a href="tree.html">Class Hierarchy</a>  <a href="Package-java.awt.image.html">This Package</a>  <a href="java.awt.image.CropImageFilter.html#_top_">Previous</a>  <a href="java.awt.image.FilteredImageSource.html#_top_">Next</a>  <a href="AllNames.html">Index</a></pre>
</body>
</html>
