BufferedImageOp, Cloneablepublic class BoxBlurFilter extends AbstractBufferedImageOp
| 构造器 | 说明 |
|---|---|
BoxBlurFilter() |
Construct a default BoxBlurFilter.
|
BoxBlurFilter(float hRadius,
float vRadius,
int iterations) |
Construct a BoxBlurFilter.
|
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
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) |
|
BufferedImage |
filter(BufferedImage src,
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.
|
String |
toString() |
clone, createCompatibleDestImage, getBounds2D, getPoint2D, getRenderingHints, getRGB, setRGBpublic 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 BufferedImage filter(BufferedImage src, 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 directiongetHRadius()public float getHRadius()
setHRadius(float)public void setVRadius(float vRadius)
vRadius - the radius of the blur in the vertical directiongetVRadius()public float getVRadius()
setVRadius(float)public void setRadius(float radius)
radius - the radius of the blur in both directionsgetRadius()public float getRadius()
setRadius(float)public void setIterations(int iterations)
iterations - the number of iterationsgetIterations()public int getIterations()
setIterations(int)Copyright © 2019. All rights reserved.