public class InvertMask extends CoreEffect<RenderState>
Effect.AccelType
Modifier and Type | Field and Description |
---|---|
private int |
pad |
private int |
xoff |
private int |
yoff |
DefaultInput
Constructor and Description |
---|
InvertMask()
Constructs a new
InvertMask effect with the default pad (10),
using the default input for source data. |
InvertMask(Effect input)
Constructs a new
InvertMask effect with the default pad (10),
using the given Effect as the input. |
InvertMask(int pad)
Constructs a new
InvertMask effect with the given pad value
using the default input for source data. |
InvertMask(int pad,
Effect input)
Constructs a new
InvertMask effect with the given pad value
and effect input. |
Modifier and Type | Method and Description |
---|---|
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 . |
int |
getOffsetX()
Returns the offset in the x direction, in pixels.
|
int |
getOffsetY()
Returns the offset in the y direction, in pixels.
|
int |
getPad()
Returns the amount of padding added to each side of the resulting
image, in pixels.
|
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.
|
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 |
setOffsetX(int xoff)
Sets the offset in the x direction, in pixels.
|
void |
setOffsetY(int yoff)
Sets the offset in the y direction, in pixels.
|
void |
setPad(int pad)
Sets the amount of padding added to each side of the resulting
image, in pixels.
|
filterImageDatas, getAccelType, getPeer, updatePeerKey, updatePeerKey
filter, transform, untransform, untransformClip
combineBounds, combineBounds, createCompatibleImage, ensureTransform, getCompatibleImage, getDefaultedInput, getDefaultedInput, getInputs, getNumInputs, getState, releaseCompatibleImage, setInput, transformBounds
public InvertMask()
InvertMask
effect with the default pad (10),
using the default input for source data.
This is a shorthand equivalent to:
new InvertMask(10, DefaultInput)
public InvertMask(Effect input)
InvertMask
effect with the default pad (10),
using the given Effect
as the input.
This is a shorthand equivalent to:
new InvertMask(10, input)
input
- the single input Effect
public InvertMask(int pad)
InvertMask
effect with the given pad value
using the default input for source data.pad
- the amount of padding on each side of the resulting imagejava.lang.IllegalArgumentException
- if pad
is negativepublic InvertMask(int pad, Effect input)
InvertMask
effect with the given pad value
and effect input.pad
- the amount of padding on each side of the resulting imageinput
- the single input Effect
java.lang.IllegalArgumentException
- if pad
is negativepublic 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 getPad()
public void setPad(int pad)
Min: 0 Max: Integer.MAX_VALUE Default: 0 Identity: 0
pad
- the amount of padding, in pixelsjava.lang.IllegalArgumentException
- if pad
is negativepublic int getOffsetX()
public void setOffsetX(int xoff)
Min: Integer.MIN_VALUE Max: Integer.MAX_VALUE Default: 0 Identity: 0
xoff
- the offset in the x direction, in pixelspublic int getOffsetY()
public void setOffsetY(int yoff)
Min: Integer.MIN_VALUE Max: Integer.MAX_VALUE Default: 0 Identity: 0
yoff
- the offset in the y direction, in pixelspublic 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<RenderState>
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 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