public class VariableBlurFilter extends AbstractBufferedImageOp
Constructor and Description |
---|
VariableBlurFilter() |
Modifier and Type | Method and Description |
---|---|
void |
blur(int[] in,
int[] out,
int width,
int height,
int radius,
int pass) |
protected float |
blurRadiusAt(int x,
int y,
int width,
int height)
Override this to get a different blur radius at eahc point.
|
java.awt.image.BufferedImage |
createCompatibleDestImage(java.awt.image.BufferedImage src,
java.awt.image.ColorModel dstCM) |
java.awt.image.BufferedImage |
filter(java.awt.image.BufferedImage src,
java.awt.image.BufferedImage dst) |
java.awt.image.BufferedImage |
getBlurMask()
Get the mask used to give the amount of blur at each point.
|
java.awt.geom.Rectangle2D |
getBounds2D(java.awt.image.BufferedImage src) |
int |
getHRadius()
Get the horizontal size of the blur.
|
int |
getIterations()
Get the number of iterations the blur is performed.
|
java.awt.geom.Point2D |
getPoint2D(java.awt.geom.Point2D srcPt,
java.awt.geom.Point2D dstPt) |
boolean |
getPremultiplyAlpha()
Get whether to premultiply the alpha channel.
|
int |
getRadius()
Get the radius of the effect.
|
java.awt.RenderingHints |
getRenderingHints() |
int |
getVRadius()
Get the vertical size of the blur.
|
void |
setBlurMask(java.awt.image.BufferedImage blurMask)
Set the mask used to give the amount of blur at each point.
|
void |
setHRadius(int hRadius)
Set the horizontal size of the blur.
|
void |
setIterations(int iterations)
Set the number of iterations the blur is performed.
|
void |
setPremultiplyAlpha(boolean premultiplyAlpha)
Set whether to premultiply the alpha channel.
|
void |
setRadius(int radius)
Set the radius of the effect.
|
void |
setVRadius(int vRadius)
Set the vertical size of the blur.
|
java.lang.String |
toString() |
clone, getRGB, setRGB
public void setPremultiplyAlpha(boolean premultiplyAlpha)
premultiplyAlpha
- true to premultiply the alphagetPremultiplyAlpha()
public boolean getPremultiplyAlpha()
setPremultiplyAlpha(boolean)
public java.awt.image.BufferedImage filter(java.awt.image.BufferedImage src, java.awt.image.BufferedImage dst)
public java.awt.image.BufferedImage createCompatibleDestImage(java.awt.image.BufferedImage src, java.awt.image.ColorModel dstCM)
createCompatibleDestImage
in interface java.awt.image.BufferedImageOp
createCompatibleDestImage
in class AbstractBufferedImageOp
public java.awt.geom.Rectangle2D getBounds2D(java.awt.image.BufferedImage src)
getBounds2D
in interface java.awt.image.BufferedImageOp
getBounds2D
in class AbstractBufferedImageOp
public java.awt.geom.Point2D getPoint2D(java.awt.geom.Point2D srcPt, java.awt.geom.Point2D dstPt)
getPoint2D
in interface java.awt.image.BufferedImageOp
getPoint2D
in class AbstractBufferedImageOp
public java.awt.RenderingHints getRenderingHints()
getRenderingHints
in interface java.awt.image.BufferedImageOp
getRenderingHints
in class AbstractBufferedImageOp
public void blur(int[] in, int[] out, int width, int height, int radius, int pass)
protected float blurRadiusAt(int x, int y, int width, int height)
x
- the x coordinatey
- the y coordinatewidth
- the width of the imageheight
- the height of the imagepublic void setHRadius(int hRadius)
hRadius
- the radius of the blur in the horizontal directiongetHRadius()
public int getHRadius()
setHRadius(int)
public void setVRadius(int vRadius)
vRadius
- the radius of the blur in the vertical directiongetVRadius()
public int getVRadius()
setVRadius(int)
public void setRadius(int radius)
radius
- the radiusgetRadius()
public int getRadius()
setRadius(int)
public void setIterations(int iterations)
iterations
- the number of iterationsgetIterations()
public int getIterations()
setIterations(int)
public void setBlurMask(java.awt.image.BufferedImage blurMask)
blurMask
- the maskgetBlurMask()
public java.awt.image.BufferedImage getBlurMask()
setBlurMask(java.awt.image.BufferedImage)
public java.lang.String toString()
toString
in class java.lang.Object