public class BoxBlurFilter extends AbstractBufferedImageOp
| Constructor and Description |
|---|
BoxBlurFilter()
Construct a default BoxBlurFilter.
|
BoxBlurFilter(float hRadius,
float vRadius,
int iterations)
Construct a BoxBlurFilter.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
blur(int[] in,
int[] out,
int width,
int height,
float radius)
Blur and transpose a block of ARGB pixels.
|
static void |
blurFractional(int[] in,
int[] out,
int width,
int height,
float radius) |
java.awt.image.BufferedImage |
filter(java.awt.image.BufferedImage src,
java.awt.image.BufferedImage dst) |
float |
getHRadius()
Get the horizontal size of the blur.
|
int |
getIterations()
Get the number of iterations the blur is performed.
|
boolean |
getPremultiplyAlpha()
Get whether to premultiply the alpha channel.
|
float |
getRadius()
Get the size of the blur.
|
float |
getVRadius()
Get the vertical size of the blur.
|
void |
setHRadius(float 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(float radius)
Set both the horizontal and vertical sizes of the blur.
|
void |
setVRadius(float vRadius)
Set the vertical size of the blur.
|
java.lang.String |
toString() |
clone, createCompatibleDestImage, getBounds2D, getPoint2D, getRenderingHints, getRGB, setRGB, stringToColorpublic BoxBlurFilter()
public BoxBlurFilter(float hRadius,
float vRadius,
int iterations)
hRadius - the horizontal radius of blurvRadius - the vertical radius of bluriterations - the number of time to iterate the blurpublic 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 static void blur(int[] in,
int[] out,
int width,
int height,
float radius)
in - the input pixelsout - the output pixelswidth - the width of the pixel arrayheight - the height of the pixel arrayradius - the radius of blurpublic static void blurFractional(int[] in,
int[] out,
int width,
int height,
float radius)
public void setHRadius(float hRadius)
hRadius - the radius of the blur in the horizontal direction, min-value 0getHRadius()public float getHRadius()
setHRadius(float)public void setVRadius(float vRadius)
vRadius - the radius of the blur in the vertical direction, min-value 0getVRadius()public float getVRadius()
setVRadius(float)public void setRadius(float radius)
radius - the radius of the blur in both directions, min-value 0getRadius()public float getRadius()
setRadius(float)public void setIterations(int iterations)
iterations - the number of iterations, min-value 0getIterations()public int getIterations()
setIterations(int)public java.lang.String toString()
toString in class java.lang.Object