APIdia Launch Partner
Top Description Fields Constructors Methods
com.sun.scenario.effect

public Class Brightpass

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

An effect that filters out (i.e., replaces with a transparent value) all pixels with brightness lower than the configurable threshold value.

Field Summary

Modifier and TypeField and Description
private float

Constructor Summary

AccessConstructor and Description
public
Brightpass()

Constructs a new Brightpass effect with the default threshold value (0.3), using the default input for source data.

public
Brightpass(Effect
the single input Effect
input
)

Constructs a new Brightpass effect with the default threshold value (0.3).

Method Summary

Modifier and TypeMethod and Description
public final Effect

Returns:

the input for this Effect
getInput
()

Returns the input for this Effect.

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 float

Returns:

the threshold value
getThreshold
()

Returns the threshold, which controls which pixels are included in the resulting image.

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.

public void
setThreshold(float
the threshold value
threshold
)

Sets the threshold, which controls which pixels are included in the resulting image.

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

Field Detail

thresholdback to summary
private float threshold

Constructor Detail

Brightpassback to summary
public Brightpass()

Constructs a new Brightpass effect with the default threshold value (0.3), using the default input for source data. This is a shorthand equivalent to:

    new Brightpass(DefaultInput)
Brightpassback to summary
public Brightpass(Effect input)

Constructs a new Brightpass effect with the default threshold value (0.3).

Parameters
input:Effect

the single input Effect

Exceptions
IllegalArgumentException:
if input is null

Method Detail

getInputback to summary
public final Effect getInput()

Returns the input for this Effect.

Returns:Effect

the input for this Effect

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
getThresholdback to summary
public float getThreshold()

Returns the threshold, which controls which pixels are included in the resulting image. Pixel values with brightness greater than this threshold value will be included.

Returns:float

the threshold value

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.

Parameters
input:Effect

the input for this Effect

Exceptions
IllegalArgumentException:
if input is null
setThresholdback to summary
public void setThreshold(float threshold)

Sets the threshold, which controls which pixels are included in the resulting image. Pixel values with brightness greater than this threshold value will be included.

      Min: 0.0
      Max: 1.0
  Default: 0.3
 Identity: n/a
Parameters
threshold:float

the threshold value

Exceptions
IllegalArgumentException:
if threshold is outside the allowable range