Class AbstractFilter
- java.lang.Object
-
- org.pushingpixels.substance.internal.utils.filters.AbstractFilter
-
- All Implemented Interfaces:
BufferedImageOp
- Direct Known Subclasses:
ColorSchemeFilter,GrayscaleFilter,NegatedFilter,TranslucentFilter
public abstract class AbstractFilter extends Object implements BufferedImageOp
Provides an abstract implementation of the
BufferedImageOpinterface. This class can be used to created new image filters based onBufferedImageOp.
-
-
Constructor Summary
Constructors Constructor Description AbstractFilter()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description BufferedImagecreateCompatibleDestImage(BufferedImage src, ColorModel destCM)abstract BufferedImagefilter(BufferedImage src, BufferedImage dest)Rectangle2DgetBounds2D(BufferedImage src)protected int[]getPixels(BufferedImage img, int x, int y, int w, int h, int[] pixels)Point2DgetPoint2D(Point2D srcPt, Point2D dstPt)RenderingHintsgetRenderingHints()protected voidsetPixels(BufferedImage img, int x, int y, int w, int h, int[] pixels)Writes a rectangular area of pixels in the destinationBufferedImage.
-
-
-
Method Detail
-
filter
public abstract BufferedImage filter(BufferedImage src, BufferedImage dest)
- Specified by:
filterin interfaceBufferedImageOp
-
getBounds2D
public Rectangle2D getBounds2D(BufferedImage src)
- Specified by:
getBounds2Din interfaceBufferedImageOp
-
createCompatibleDestImage
public BufferedImage createCompatibleDestImage(BufferedImage src, ColorModel destCM)
- Specified by:
createCompatibleDestImagein interfaceBufferedImageOp
-
getPoint2D
public Point2D getPoint2D(Point2D srcPt, Point2D dstPt)
- Specified by:
getPoint2Din interfaceBufferedImageOp
-
getRenderingHints
public RenderingHints getRenderingHints()
- Specified by:
getRenderingHintsin interfaceBufferedImageOp
-
getPixels
protected int[] getPixels(BufferedImage img, int x, int y, int w, int h, int[] pixels)
-
setPixels
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 fromBufferedImage.TYPE_INT_ARGBandBufferedImage.TYPE_INT_RGBwill unmanage the image.- Parameters:
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 integers- Throws:
IllegalArgumentException- ispixelsis non-null and of length < w*h
-
-