Top Description Fields Constructors Methods
com.sun.scenario.effect

public Class InvertMask

extends CoreEffect<RenderState>
Class Inheritance
Imports
com.sun.javafx.geom.BaseBounds, .DirtyRegionContainer, .DirtyRegionPool, .RectBounds, .Rectangle, com.sun.javafx.geom.transform.BaseTransform, com.sun.scenario.effect.impl.state.RenderState

An effect that returns a mask that is the inverse of the input (i.e., opaque areas of the input become transparent and vice versa) with a given offset and padding.

Field Summary

Modifier and TypeField and Description
private int
private int
private int

Constructor Summary

AccessConstructor and Description
public
InvertMask()

Constructs a new InvertMask effect with the default pad (10), using the default input for source data.

public
InvertMask(Effect
the single input Effect
input
)

Constructs a new InvertMask effect with the default pad (10), using the given Effect as the input.

public
InvertMask(int
the amount of padding on each side of the resulting image
pad
)

Constructs a new InvertMask effect with the given pad value using the default input for source data.

public
InvertMask(int
the amount of padding on each side of the resulting image
pad
,
Effect
the single input Effect
input
)

Constructs a new InvertMask effect with the given pad value and effect input.

Method Summary

Modifier and TypeMethod and Description
public BaseBounds
getBounds(BaseTransform transform, Effect defaultInput)

Overrides com.sun.scenario.effect.FilterEffect.getBounds.

Returns the bounding box that will be affected by this filter operation when viewed under the specified transform, given its list of input Effects and the specified defaultInput effect.

public DirtyRegionContainer
getDirtyRegions(Effect defaultInput, DirtyRegionPool regionPool)

Overrides com.sun.scenario.effect.Effect.getDirtyRegions.

Returns the dirty region container containing dirty regions affected by this filter operation.

public final Effect

Returns:

the input for this Effect
getInput
()

Returns the input for this Effect.

public int

Returns:

the offset in the x direction, in pixels.
getOffsetX
()

Returns the offset in the x direction, in pixels.

public int

Returns:

the offset in the y direction, in pixels.
getOffsetY
()

Returns the offset in the y direction, in pixels.

public int

Returns:

the amount of padding, in pixels
getPad
()

Returns the amount of padding added to each side of the resulting image, in pixels.

public RenderState
getRenderState(FilterContext fctx, BaseTransform transform, Rectangle outputClip, Object renderHelper, Effect defaultInput)

Implements abstract com.sun.scenario.effect.FilterEffect.getRenderState.

Returns the object representing the rendering strategy and state for the filter operation characterized by the specified arguments.

public Rectangle
public boolean
reducesOpaquePixels()

Implements abstract com.sun.scenario.effect.Effect.reducesOpaquePixels.

Whether an opacity for any pixel is different (lower) than the corresponding pixel in the default input.

public void
setInput(Effect
the input for this Effect
input
)

Sets the input for this Effect to a specific Effect or to the default input if input is null.

public void
setOffsetX(int
the offset in the x direction, in pixels
xoff
)

Sets the offset in the x direction, in pixels.

public void
setOffsetY(int
the offset in the y direction, in pixels
yoff
)

Sets the offset in the y direction, in pixels.

public void
setPad(int
the amount of padding, in pixels
pad
)

Sets the amount of padding added to each side of the resulting image, in pixels.

Inherited from com.sun.scenario.effect.CoreEffect:
filterImageDatasgetAccelTypegetPeerupdatePeerKeyupdatePeerKey

Field Detail

padback to summary
private int pad
xoffback to summary
private int xoff
yoffback to summary
private int yoff

Constructor Detail

InvertMaskback to summary
public InvertMask()

Constructs a new InvertMask effect with the default pad (10), using the default input for source data. This is a shorthand equivalent to:

    new InvertMask(10, DefaultInput)
InvertMaskback to summary
public InvertMask(Effect input)

Constructs a new InvertMask effect with the default pad (10), using the given Effect as the input. This is a shorthand equivalent to:

    new InvertMask(10, input)
Parameters
input:Effect

the single input Effect

InvertMaskback to summary
public InvertMask(int pad)

Constructs a new InvertMask effect with the given pad value using the default input for source data.

Parameters
pad:int

the amount of padding on each side of the resulting image

Exceptions
IllegalArgumentException:
if pad is negative
InvertMaskback to summary
public InvertMask(int pad, Effect input)

Constructs a new InvertMask effect with the given pad value and effect input.

Parameters
pad:int

the amount of padding on each side of the resulting image

input:Effect

the single input Effect

Exceptions
IllegalArgumentException:
if pad is negative

Method Detail

getBoundsback to summary
public BaseBounds getBounds(BaseTransform transform, Effect defaultInput)

Overrides com.sun.scenario.effect.FilterEffect.getBounds.

Doc from com.sun.scenario.effect.Effect.getBounds.

Returns the bounding box that will be affected by this filter operation when viewed under the specified transform, given its list of input Effects and the specified defaultInput effect. Note that the returned bounds can be smaller or larger than one or more of the inputs.

Annotations
@Override
getDirtyRegionsback to summary
public DirtyRegionContainer getDirtyRegions(Effect defaultInput, DirtyRegionPool regionPool)

Overrides com.sun.scenario.effect.Effect.getDirtyRegions.

Doc from com.sun.scenario.effect.Effect.getDirtyRegions.

Returns the dirty region container containing dirty regions affected by this filter operation.

Annotations
@Override
getInputback to summary
public final Effect getInput()

Returns the input for this Effect.

Returns:Effect

the input for this Effect

getOffsetXback to summary
public int getOffsetX()

Returns the offset in the x direction, in pixels.

Returns:int

the offset in the x direction, in pixels.

getOffsetYback to summary
public int getOffsetY()

Returns the offset in the y direction, in pixels.

Returns:int

the offset in the y direction, in pixels.

getPadback to summary
public int getPad()

Returns the amount of padding added to each side of the resulting image, in pixels.

Returns:int

the amount of padding, in pixels

getRenderStateback to summary
public RenderState getRenderState(FilterContext fctx, BaseTransform transform, Rectangle outputClip, Object renderHelper, Effect defaultInput)

Implements abstract com.sun.scenario.effect.FilterEffect.getRenderState.

Doc from com.sun.scenario.effect.FilterEffect.getRenderState.

Returns the object representing the rendering strategy and state for the filter operation characterized by the specified arguments. This call can also be used to get a state object for non-rendering cases like querying the bounds of an operation in which case the FilterContext object may be null. outputClip and renderHelper may always be null just as they may be null for a given filter operation.

Annotations
@Override
getResultBoundsback to summary
public Rectangle getResultBounds(BaseTransform transform, Rectangle outputClip, ImageData... inputDatas)

Overrides com.sun.scenario.effect.Effect.getResultBounds.

Annotations
@Override
reducesOpaquePixelsback to summary
public boolean reducesOpaquePixels()

Implements abstract com.sun.scenario.effect.Effect.reducesOpaquePixels.

Doc from com.sun.scenario.effect.Effect.reducesOpaquePixels.

Whether an opacity for any pixel is different (lower) than the corresponding pixel in the default input. It is always safe to return true from this method, though the consequences may be that the caller chooses to not utilize a planned optimization.

Annotations
@Override
setInputback to summary
public void setInput(Effect input)

Sets the input for this Effect to a specific Effect or to the default input if input is null.

Parameters
input:Effect

the input for this Effect

setOffsetXback to summary
public void setOffsetX(int xoff)

Sets the offset in the x direction, in pixels.

      Min: Integer.MIN_VALUE
      Max: Integer.MAX_VALUE
  Default: 0
 Identity: 0
Parameters
xoff:int

the offset in the x direction, in pixels

setOffsetYback to summary
public void setOffsetY(int yoff)

Sets the offset in the y direction, in pixels.

      Min: Integer.MIN_VALUE
      Max: Integer.MAX_VALUE
  Default: 0
 Identity: 0
Parameters
yoff:int

the offset in the y direction, in pixels

setPadback to summary
public void setPad(int pad)

Sets the amount of padding added to each side of the resulting image, in pixels.

      Min: 0
      Max: Integer.MAX_VALUE
  Default: 0
 Identity: 0
Parameters
pad:int

the amount of padding, in pixels

Exceptions
IllegalArgumentException:
if pad is negative