BufferedImageOpColorSchemeFilter, GrayscaleFilter, NegatedFilter, TranslucentFilterpublic abstract class AbstractFilter extends Object implements BufferedImageOp
Provides an abstract implementation of the BufferedImageOp
interface. This class can be used to created new image filters based on
BufferedImageOp.
| Constructor | Description |
|---|---|
AbstractFilter() |
| Modifier and Type | Method | Description |
|---|---|---|
BufferedImage |
createCompatibleDestImage(BufferedImage src,
ColorModel destCM) |
|
abstract BufferedImage |
filter(BufferedImage src,
BufferedImage dest) |
|
Rectangle2D |
getBounds2D(BufferedImage src) |
|
protected int[] |
getPixels(BufferedImage img,
int x,
int y,
int w,
int h,
int[] pixels) |
|
Point2D |
getPoint2D(Point2D srcPt,
Point2D dstPt) |
|
RenderingHints |
getRenderingHints() |
|
protected void |
setPixels(BufferedImage img,
int x,
int y,
int w,
int h,
int[] pixels) |
Writes a rectangular area of pixels in the destination
BufferedImage. |
public abstract BufferedImage filter(BufferedImage src, BufferedImage dest)
filter in interface BufferedImageOppublic Rectangle2D getBounds2D(BufferedImage src)
getBounds2D in interface BufferedImageOppublic BufferedImage createCompatibleDestImage(BufferedImage src, ColorModel destCM)
createCompatibleDestImage in interface BufferedImageOppublic Point2D getPoint2D(Point2D srcPt, Point2D dstPt)
getPoint2D in interface BufferedImageOppublic RenderingHints getRenderingHints()
getRenderingHints in interface BufferedImageOpprotected int[] getPixels(BufferedImage img, int x, int y, int w, int h, int[] pixels)
protected void setPixels(BufferedImage img, int x, int y, int w, int h, int[] pixels)
Writes a rectangular area of pixels in the destination
BufferedImage. Calling this method on an image of type
different from BufferedImage.TYPE_INT_ARGB and
BufferedImage.TYPE_INT_RGB will unmanage the image.
img - the destination imagex - the x location at which to start storing pixelsy - the y location at which to start storing pixelsw - the width of the rectangle of pixels to storeh - the height of the rectangle of pixels to storepixels - an array of pixels, stored as integersIllegalArgumentException - is pixels is non-null and of length < w*h