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

public Class GaussianBlur

extends LinearConvolveCoreEffect
Class Inheritance
Imports
com.sun.javafx.geom.BaseBounds, .DirtyRegionContainer, .DirtyRegionPool, .RectBounds, .Rectangle, com.sun.javafx.geom.transform.BaseTransform, com.sun.scenario.effect.impl.Renderer, com.sun.scenario.effect.impl.state.GaussianBlurState, .LinearConvolveKernel

A blur effect using a Gaussian convolution kernel, with a configurable radius.

Field Summary

Modifier and TypeField and Description
private GaussianBlurState

Constructor Summary

AccessConstructor and Description
public
GaussianBlur()

Constructs a new GaussianBlur effect with the default radius (10.0), using the default input for source data.

public
GaussianBlur(float
the radius of the Gaussian kernel
radius
)

Constructs a new GaussianBlur effect with the given radius, using the default input for source data.

public
GaussianBlur(float
the radius of the Gaussian kernel
radius
,
Effect
the single input Effect
input
)

Constructs a new GaussianBlur effect with the given radius.

Method Summary

Modifier and TypeMethod and Description
public Effect.AccelType
getAccelType(FilterContext fctx)

Overrides com.sun.scenario.effect.CoreEffect.getAccelType.

Returns one of the AccelType values, indicating whether this Effect is accelerated in hardware for the given FilterContext.

public BaseBounds
getBounds(BaseTransform
the transform the effect will be viewed under
transform
,
Effect
the default input Effect to be used in all cases where a filter has a null input
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
the default input Effect to be used in all cases where a filter has a null input
defaultInput
,
DirtyRegionPool
the pool of dirty regions
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 float

Returns:

the radius of the Gaussian kernel
getRadius
()

Returns the radius of the Gaussian kernel.

public Rectangle
pack-priv LinearConvolveKernel
getState()

Implements abstract com.sun.scenario.effect.LinearConvolveCoreEffect.getState.

Returns state object that is associated with this effect instance.

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
setRadius(float
the radius of the Gaussian kernel
radius
)

Sets the radius of the Gaussian kernel.

Inherited from com.sun.scenario.effect.LinearConvolveCoreEffect:
filterImageDatasgetRenderState

Field Detail

stateback to summary
private GaussianBlurState state

Constructor Detail

GaussianBlurback to summary
public GaussianBlur()

Constructs a new 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)
GaussianBlurback to summary
public GaussianBlur(float radius)

Constructs a new GaussianBlur effect with the given radius, using the default input for source data. This is a shorthand equivalent to:

    new GaussianBlur(radius, DefaultInput)
Parameters
radius:float

the radius of the Gaussian kernel

Exceptions
IllegalArgumentException:
if radius is outside the allowable range
GaussianBlurback to summary
public GaussianBlur(float radius, Effect input)

Constructs a new GaussianBlur effect with the given radius.

Parameters
radius:float

the radius of the Gaussian kernel

input:Effect

the single input Effect

Exceptions
IllegalArgumentException:
if radius is outside the allowable range, or if input is null

Method Detail

getAccelTypeback to summary
public Effect.AccelType getAccelType(FilterContext fctx)

Overrides com.sun.scenario.effect.CoreEffect.getAccelType.

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

Returns one of the AccelType values, indicating whether this Effect is accelerated in hardware for the given FilterContext.

Returns:Effect.AccelType

one of the AccelType values

Annotations
@Override
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.

Parameters
transform:BaseTransform

the transform the effect will be viewed under

defaultInput:Effect

the default input Effect to be used in all cases where a filter has a null input

Returns:BaseBounds

the bounding box of this filter

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.

Parameters
defaultInput:Effect

the default input Effect to be used in all cases where a filter has a null input

regionPool:DirtyRegionPool

the pool of dirty regions

Returns:DirtyRegionContainer

the dirty region container

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

Returns the input for this Effect.

Returns:Effect

the input for this Effect

getRadiusback to summary
public float getRadius()

Returns the radius of the Gaussian kernel.

Returns:float

the radius of the Gaussian kernel

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

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

Annotations
@Override
getStateback to summary
pack-priv LinearConvolveKernel getState()

Implements abstract com.sun.scenario.effect.LinearConvolveCoreEffect.getState.

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

Returns state object that is associated with this effect instance. Subclasses may override this method to return some sort of state object that contains implementation details that are hidden from the public API. Classes outside this package can use the AccessHelper class to get access to this package-private method.

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.

Returns:boolean

true if this effect may reduce opacity of some pixels of one of it's input (and thus the default input) or it's relevant input(s) might have reduced opaque pixels of the default input already.

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

setRadiusback to summary
public void setRadius(float radius)

Sets the radius of the Gaussian kernel.

      Min:  0.0
      Max: 63.0
  Default: 10.0
 Identity:  0.0
Parameters
radius:float

the radius of the Gaussian kernel

Exceptions
IllegalArgumentException:
if radius is outside the allowable range