java.awt.image.BufferedImageOp
ColorShiftFilter
public abstract class AbstractFilter
extends java.lang.Object
implements java.awt.image.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 |
---|---|---|
java.awt.image.BufferedImage |
createCompatibleDestImage(java.awt.image.BufferedImage src,
java.awt.image.ColorModel destCM) |
|
java.awt.geom.Rectangle2D |
getBounds2D(java.awt.image.BufferedImage src) |
|
protected int[] |
getPixels(java.awt.image.BufferedImage img,
int x,
int y,
int w,
int h,
int[] pixels) |
Returns an array of integer pixels in the default RGB color model
(TYPE_INT_ARGB) and default sRGB color space, from a portion of the image
data.
|
java.awt.geom.Point2D |
getPoint2D(java.awt.geom.Point2D srcPt,
java.awt.geom.Point2D dstPt) |
|
java.awt.RenderingHints |
getRenderingHints() |
|
protected void |
setPixels(java.awt.image.BufferedImage img,
int x,
int y,
int w,
int h,
int[] pixels) |
Writes a rectangular area of pixels in the destination
BufferedImage . |
public java.awt.geom.Rectangle2D getBounds2D(java.awt.image.BufferedImage src)
getBounds2D
in interface java.awt.image.BufferedImageOp
public java.awt.image.BufferedImage createCompatibleDestImage(java.awt.image.BufferedImage src, java.awt.image.ColorModel destCM)
createCompatibleDestImage
in interface java.awt.image.BufferedImageOp
public java.awt.geom.Point2D getPoint2D(java.awt.geom.Point2D srcPt, java.awt.geom.Point2D dstPt)
getPoint2D
in interface java.awt.image.BufferedImageOp
public java.awt.RenderingHints getRenderingHints()
getRenderingHints
in interface java.awt.image.BufferedImageOp
protected int[] getPixels(java.awt.image.BufferedImage img, int x, int y, int w, int h, int[] pixels)
img
- Image.x
- The starting X coordinatey
- The starting Y coordinatew
- Width of region.h
- Height of region.pixels
- If not null
, the pixels are written here.protected void setPixels(java.awt.image.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 integersjava.lang.IllegalArgumentException
- is pixels
is non-null and of length < w*h