public class ZoomRadialBlur extends CoreEffect<RenderState>
Effect.AccelType
Modifier and Type | Field and Description |
---|---|
private float |
centerX |
private float |
centerY |
private int |
r |
private ZoomRadialBlurState |
state |
DefaultInput
Constructor and Description |
---|
ZoomRadialBlur()
Constructs a new
ZoomRadialBlur effect with the default
radius (1), using the default input for source data. |
ZoomRadialBlur(int radius)
Constructs a new
ZoomRadialBlur effect with the given radius,
using the default input for source data. |
ZoomRadialBlur(int radius,
Effect input)
Constructs a new
ZoomRadialBlur effect with the given radius. |
Modifier and Type | Method and Description |
---|---|
ImageData |
filterImageDatas(FilterContext fctx,
BaseTransform transform,
Rectangle outputClip,
RenderState rstate,
ImageData... inputs)
Convenience method that sends the given input data through the
current peer, and then attempts to release the input image data.
|
float |
getCenterX()
Returns the X coordinate of the center point of this effect.
|
float |
getCenterY()
Returns the Y coordinate of the center point of this 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 . |
int |
getRadius()
Returns the radius of the effect kernel.
|
RenderState |
getRenderState(FilterContext fctx,
BaseTransform transform,
Rectangle outputClip,
java.lang.Object renderHelper,
Effect defaultInput)
Returns the object representing the rendering strategy and state for
the filter operation characterized by the specified arguments.
|
(package private) java.lang.Object |
getState()
Returns state object that is associated with this effect instance.
|
boolean |
reducesOpaquePixels()
Whether an opacity for any pixel is different (lower)
than the corresponding pixel in the default input.
|
void |
setCenterX(float centerX)
Sets the X coordinate of the center point of this effect.
|
void |
setCenterY(float centerY)
Sets the Y coordinate of the center point of this effect.
|
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(int radius)
Sets the radius of the effect kernel.
|
private void |
updatePeer()
Updates the peer "key" for the current radius.
|
getAccelType, getPeer, updatePeerKey, updatePeerKey
filter, getBounds, transform, untransform, untransformClip
combineBounds, combineBounds, createCompatibleImage, ensureTransform, getCompatibleImage, getDefaultedInput, getDefaultedInput, getInputs, getNumInputs, getResultBounds, releaseCompatibleImage, setInput, transformBounds
private int r
private float centerX
private float centerY
private final ZoomRadialBlurState state
public ZoomRadialBlur()
ZoomRadialBlur
effect with the default
radius (1), using the default input for source data.
This is a shorthand equivalent to:
new ZoomRadialBlur(1, DefaultInput)
public ZoomRadialBlur(int radius)
ZoomRadialBlur
effect with the given radius,
using the default input for source data.
This is a shorthand equivalent to:
new ZoomRadialBlur(radius, DefaultInput)
radius
- the radius of the kerneljava.lang.IllegalArgumentException
- if radius
is outside the
allowable rangepublic ZoomRadialBlur(int radius, Effect input)
ZoomRadialBlur
effect with the given radius.radius
- of ZoomRadialBlurinput
- the single input Effect
java.lang.IllegalArgumentException
- if radius
is outside the
allowable rangejava.lang.Object getState()
Effect
public 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 int getRadius()
public void setRadius(int radius)
Min: 1 Max: 64 Default: 1 Identity: n/a
radius
- the radius of the effect kerneljava.lang.IllegalArgumentException
- if radius
is outside the
allowable rangeprivate void updatePeer()
public float getCenterX()
public void setCenterX(float centerX)
centerX
- the X coordinate of the center pointpublic float getCenterY()
public void setCenterY(float centerY)
centerY
- the Y coordinate of the center pointpublic ImageData filterImageDatas(FilterContext fctx, BaseTransform transform, Rectangle outputClip, RenderState rstate, ImageData... inputs)
CoreEffect
filterImageDatas
in class CoreEffect<RenderState>
public RenderState getRenderState(FilterContext fctx, BaseTransform transform, Rectangle outputClip, java.lang.Object renderHelper, Effect defaultInput)
FilterEffect
FilterContext
object may be null.
outputClip
and renderHelper
may always be null just
as they may be null for a given filter operation.getRenderState
in class FilterEffect<RenderState>
fctx
- the context object that would be used by the Renderer
if this call is preparing for a render operation, or nulltransform
- the transform for the output of this operationoutputClip
- the clip rectangle that may restrict this operation, or nullrenderHelper
- the rendering helper object that can be used to shortcut
this operation under certain conditions, or nulldefaultInput
- the Effect
to be used in place of any null inputspublic 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 regions