public class GaussianBlur extends LinearConvolveCoreEffect
Effect.AccelType
DefaultInput
Constructor and Description |
---|
GaussianBlur()
Constructs a new
GaussianBlur effect with the default radius
(10.0), using the default input for source data. |
GaussianBlur(float radius)
Constructs a new
GaussianBlur effect with the given radius,
using the default input for source data. |
GaussianBlur(float radius,
Effect input)
Constructs a new
GaussianBlur effect with the given radius. |
Modifier and Type | Method and Description |
---|---|
Effect.AccelType |
getAccelType(FilterContext fctx)
Returns one of the
AccelType values, indicating
whether this Effect is accelerated in hardware for the
given FilterContext . |
BaseBounds |
getBounds(BaseTransform transform,
Effect defaultInput)
Returns the bounding box that will be affected by this filter
operation when viewed under the specified
transform ,
given its list of input Effect s and the specified
defaultInput effect. |
DirtyRegionContainer |
getDirtyRegions(Effect defaultInput,
DirtyRegionPool regionPool)
Returns the dirty region container containing dirty regions affected
by this filter operation.
|
Effect |
getInput()
Returns the input for this
Effect . |
float |
getRadius()
Returns the radius of the Gaussian kernel.
|
Rectangle |
getResultBounds(BaseTransform transform,
Rectangle outputClip,
ImageData... inputDatas) |
boolean |
reducesOpaquePixels()
Whether an opacity for any pixel is different (lower)
than the corresponding pixel in the default input.
|
void |
setInput(Effect input)
Sets the input for this
Effect to a specific Effect
or to the default input if input is null . |
void |
setRadius(float radius)
Sets the radius of the Gaussian kernel.
|
filterImageDatas, getRenderState
filter, transform, untransform, untransformClip
combineBounds, combineBounds, createCompatibleImage, ensureTransform, getCompatibleImage, getInputs, getNumInputs, releaseCompatibleImage, setInput, transformBounds
public GaussianBlur()
GaussianBlur
effect with the default radius
(10.0), using the default input for source data.
This is a shorthand equivalent to:
new GaussianBlur(10f, DefaultInput)
public GaussianBlur(float radius)
GaussianBlur
effect with the given radius,
using the default input for source data.
This is a shorthand equivalent to:
new GaussianBlur(radius, DefaultInput)
radius
- the radius of the Gaussian kernelIllegalArgumentException
- if radius
is outside the
allowable rangepublic GaussianBlur(float radius, Effect input)
GaussianBlur
effect with the given radius.radius
- the radius of the Gaussian kernelinput
- the single input Effect
IllegalArgumentException
- if radius
is outside the
allowable range, or if input
is nullpublic Effect.AccelType getAccelType(FilterContext fctx)
Effect
AccelType
values, indicating
whether this Effect
is accelerated in hardware for the
given FilterContext
.AccelType
valuespublic final Effect getInput()
Effect
.Effect
public void setInput(Effect input)
Effect
to a specific Effect
or to the default input if input
is null
.input
- the input for this Effect
public float getRadius()
public void setRadius(float radius)
Min: 0.0 Max: 63.0 Default: 10.0 Identity: 0.0
radius
- the radius of the Gaussian kernelIllegalArgumentException
- if radius
is outside the
allowable rangepublic BaseBounds getBounds(BaseTransform transform, Effect defaultInput)
Effect
transform
,
given its list of input Effect
s and the specified
defaultInput
effect.
Note that the returned bounds can be smaller or larger than one
or more of the inputs.getBounds
in class FilterEffect<LinearConvolveRenderState>
transform
- the transform the effect will be viewed underdefaultInput
- the default input Effect
to be used in
all cases where a filter has a null inputpublic Rectangle getResultBounds(BaseTransform transform, Rectangle outputClip, ImageData... inputDatas)
getResultBounds
in class Effect
public boolean reducesOpaquePixels()
Effect
reducesOpaquePixels
in class Effect
public DirtyRegionContainer getDirtyRegions(Effect defaultInput, DirtyRegionPool regionPool)
Effect
getDirtyRegions
in class Effect
defaultInput
- the default input Effect
to be used in
all cases where a filter has a null inputregionPool
- the pool of dirty regionsCopyright © 2020. All rights reserved.