<!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.AreaAveragingScaleFilter
</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="Package-java.awt.image.html">Previous</a>  <a href="java.awt.image.ColorModel.html#_top_">Next</a>  <a href="AllNames.html">Index</a></pre>
<hr>
<h1>
  Class java.awt.image.AreaAveragingScaleFilter
</h1>
<pre>
<a href="java.lang.Object.html#_top_">java.lang.Object</a>
   |
   +----<a href="java.awt.image.ImageFilter.html#_top_">java.awt.image.ImageFilter</a>
           |
           +----<a href="java.awt.image.ReplicateScaleFilter.html#_top_">java.awt.image.ReplicateScaleFilter</a>
                   |
                   +----java.awt.image.AreaAveragingScaleFilter
</pre>
<hr>
<dl>
  <dt> public class <b>AreaAveragingScaleFilter</b>
  <dt> extends <a href="java.awt.image.ReplicateScaleFilter.html#_top_">ReplicateScaleFilter</a>
</dl>
An ImageFilter class for scaling images using a simple area averaging
 algorithm that produces smoother results than the nearest neighbor
 algorithm.
 This class extends the basic ImageFilter Class to scale an existing
 image and provide a source for a new image containing the resampled
 image.  The pixels in the source image are blended to produce pixels
 for an image of the specified size.  The blending process is analogous
 to scaling up the source image to a multiple of the destination size
 using pixel replication and then scaling it back down to the destination
 size by simply averaging all the pixels in the supersized image that
 fall within a given pixel of the destination image.  If the data from
 the source is not delivered in TopDownLeftRight order then the filter
 will back off to a simple pixel replication behavior and utilize the
 requestTopDownLeftRightResend() method to refilter the pixels in a
 better way at the end.
 It is meant to be used in conjunction with a FilteredImageSource
 object to produce scaled versions of existing images.
<p>
<dl>
    <dt> <b>See Also:</b>
    <dd> <a href="java.awt.image.FilteredImageSource.html#_top_">FilteredImageSource</a>, ReplicateImageFilter, <a href="java.awt.image.ImageFilter.html#_top_">ImageFilter</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="#AreaAveragingScaleFilter(int, int)"><b>AreaAveragingScaleFilter</b></a>(int, int)
  <dd>  Constructs an AreaAveragingScaleFilter that scales the pixels from
 its source Image as specified by the width and height parameters.
</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="#setHints(int)"><b>setHints</b></a>(int)
  <dd>  Detect if the data is being delivered with the necessary hints
 to allow the averaging algorithm to do its work.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#setPixels(int, int, int, int, java.awt.image.ColorModel, byte[], int, int)"><b>setPixels</b></a>(int, int, int, int, ColorModel, byte[], int, int)
  <dd>  Combine the components for the delivered byte pixels into the
 accumulation arrays and send on any averaged data for rows of
 pixels that are complete.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#setPixels(int, int, int, int, java.awt.image.ColorModel, int[], int, int)"><b>setPixels</b></a>(int, int, int, int, ColorModel, int[], int, int)
  <dd>  Combine the components for the delivered int pixels into the
 accumulation arrays and send on any averaged data for rows of
 pixels that are complete.
</dl>
<a name="constructors"></a>
<h2>
  <img src="images/constructors.gif" width=231 height=38 alt="Constructors">
</h2>
<a name="AreaAveragingScaleFilter"></a>
<a name="AreaAveragingScaleFilter(int, int)"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
<b>AreaAveragingScaleFilter</b>
<pre>
 public AreaAveragingScaleFilter(int width,
                                 int height)
</pre>
<dl>
  <dd> Constructs an AreaAveragingScaleFilter that scales the pixels from
 its source Image as specified by the width and height parameters.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> width - the target width to scale the image
    <dd> height - the target height to scale the image
  </dl></dd>
</dl>
<a name="methods"></a>
<h2>
  <img src="images/methods.gif" width=151 height=38 alt="Methods">
</h2>
<a name="setHints(int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="setHints"><b>setHints</b></a>
<pre>
 public void setHints(int hints)
</pre>
<dl>
  <dd> Detect if the data is being delivered with the necessary hints
 to allow the averaging algorithm to do its work.
<p>
  <dd><dl>
    <dt> <b>Overrides:</b>
    <dd> <a href="java.awt.image.ImageFilter.html#setHints(int)">setHints</a> in class <a href="java.awt.image.ImageFilter.html#_top_">ImageFilter</a>
    <dt> <b>See Also:</b>
    <dd> <a href="java.awt.image.ImageConsumer.html#setHints">setHints</a>
  </dl></dd>
</dl>
<a name="setPixels(int, int, int, int, java.awt.image.ColorModel, byte[], int, int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="setPixels"><b>setPixels</b></a>
<pre>
 public void setPixels(int x,
                       int y,
                       int w,
                       int h,
                       <a href="java.awt.image.ColorModel.html#_top_">ColorModel</a> model,
                       byte pixels[],
                       int off,
                       int scansize)
</pre>
<dl>
  <dd> Combine the components for the delivered byte pixels into the
 accumulation arrays and send on any averaged data for rows of
 pixels that are complete.  If the correct hints were not
 specified in the setHints call then relay the work to our
 superclass which is capable of scaling pixels regardless of
 the delivery hints.
<p>
  <dd><dl>
    <dt> <b>Overrides:</b>
    <dd> <a href="java.awt.image.ReplicateScaleFilter.html#setPixels(int, int, int, int, java.awt.image.ColorModel, byte[], int, int)">setPixels</a> in class <a href="java.awt.image.ReplicateScaleFilter.html#_top_">ReplicateScaleFilter</a>
    <dt> <b>See Also:</b>
    <dd> <a href="java.awt.image.ReplicateScaleFilter.html#_top_">ReplicateScaleFilter</a>
  </dl></dd>
</dl>
<a name="setPixels(int, int, int, int, java.awt.image.ColorModel, int[], int, int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="setPixels"><b>setPixels</b></a>
<pre>
 public void setPixels(int x,
                       int y,
                       int w,
                       int h,
                       <a href="java.awt.image.ColorModel.html#_top_">ColorModel</a> model,
                       int pixels[],
                       int off,
                       int scansize)
</pre>
<dl>
  <dd> Combine the components for the delivered int pixels into the
 accumulation arrays and send on any averaged data for rows of
 pixels that are complete.  If the correct hints were not
 specified in the setHints call then relay the work to our
 superclass which is capable of scaling pixels regardless of
 the delivery hints.
<p>
  <dd><dl>
    <dt> <b>Overrides:</b>
    <dd> <a href="java.awt.image.ReplicateScaleFilter.html#setPixels(int, int, int, int, java.awt.image.ColorModel, int[], int, int)">setPixels</a> in class <a href="java.awt.image.ReplicateScaleFilter.html#_top_">ReplicateScaleFilter</a>
    <dt> <b>See Also:</b>
    <dd> <a href="java.awt.image.ReplicateScaleFilter.html#_top_">ReplicateScaleFilter</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="Package-java.awt.image.html">Previous</a>  <a href="java.awt.image.ColorModel.html#_top_">Next</a>  <a href="AllNames.html">Index</a></pre>
</body>
</html>
