com.sun.jimi.core.filters
Class AreaAverageScaleFilter
java.lang.Object
|
+--java.awt.image.ImageFilter
|
+--com.sun.jimi.core.filters.ReplicatingScaleFilter
|
+--com.sun.jimi.core.filters.AreaAverageScaleFilter
- public class AreaAverageScaleFilter
- extends ReplicatingScaleFilter
Area-averaging scale filter based on java.awt.image.AreaAveragingScaleFilter,
but more robust.
Fields inherited from class java.awt.image.ImageFilter |
consumer |
Constructor Summary |
AreaAverageScaleFilter(int width,
int height)
Constructs an AreaAverageScaleFilter that scales the pixels from
its source Image as specified by the width and height parameters. |
Method Summary |
void |
setHints(int hints)
Detect if the data is being delivered with the necessary hints
to allow the averaging algorithm to do its work. |
void |
setPixels(int x,
int y,
int w,
int h,
java.awt.image.ColorModel model,
byte[] pixels,
int off,
int scansize)
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. |
void |
setPixels(int x,
int y,
int w,
int h,
java.awt.image.ColorModel model,
int[] pixels,
int off,
int scansize)
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. |
Methods inherited from class java.awt.image.ImageFilter |
clone,
getFilterInstance,
imageComplete,
resendTopDownLeftRight,
setColorModel |
Methods inherited from class java.lang.Object |
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
AreaAverageScaleFilter
public AreaAverageScaleFilter(int width,
int height)
- Constructs an AreaAverageScaleFilter that scales the pixels from
its source Image as specified by the width and height parameters.
- Parameters:
width
- the target width to scale the imageheight
- the target height to scale the image
setHints
public void setHints(int hints)
- Detect if the data is being delivered with the necessary hints
to allow the averaging algorithm to do its work.
- Overrides:
- setHints in class java.awt.image.ImageFilter
- See Also:
ImageConsumer.setHints(int)
setPixels
public void setPixels(int x,
int y,
int w,
int h,
java.awt.image.ColorModel model,
byte[] pixels,
int off,
int scansize)
- 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.
- Overrides:
- setPixels in class ReplicatingScaleFilter
- See Also:
ReplicateScaleFilter
setPixels
public void setPixels(int x,
int y,
int w,
int h,
java.awt.image.ColorModel model,
int[] pixels,
int off,
int scansize)
- 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.
- Overrides:
- setPixels in class ReplicatingScaleFilter
- See Also:
ReplicateScaleFilter