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

public Class SepiaTone

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

A filter that produces a sepia tone effect, similar to antique photographs.

Field Summary

Modifier and TypeField and Description
private float

Constructor Summary

AccessConstructor and Description
public
SepiaTone()

Constructs a new SepiaTone effect with the default level value (1.0), using the default input for source data.

public
SepiaTone(Effect
the single input Effect
input
)

Constructs a new SepiaTone effect with the default level value (1.0).

Method Summary

Modifier and TypeMethod and Description
public final Effect

Returns:

the input for this Effect
getInput
()

Returns the input for this Effect.

public float

Returns:

the level value
getLevel
()

Returns the level value, which controls the intensity of the sepia 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 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
setLevel(float
the level value
level
)

Sets the level value, which controls the intensity of the sepia effect.

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

Field Detail

levelback to summary
private float level

Constructor Detail

SepiaToneback to summary
public SepiaTone()

Constructs a new SepiaTone effect with the default level value (1.0), using the default input for source data. This is a shorthand equivalent to:

    new SepiaTone(DefaultInput)
SepiaToneback to summary
public SepiaTone(Effect input)

Constructs a new SepiaTone effect with the default level value (1.0).

Parameters
input:Effect

the single input Effect

Method Detail

getInputback to summary
public final Effect getInput()

Returns the input for this Effect.

Returns:Effect

the input for this Effect

getLevelback to summary
public float getLevel()

Returns the level value, which controls the intensity of the sepia effect.

Returns:float

the level value

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
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

setLevelback to summary
public void setLevel(float level)

Sets the level value, which controls the intensity of the sepia effect.

      Min: 0.0
      Max: 1.0
  Default: 1.0
 Identity: 0.0
Parameters
level:float

the level value

Exceptions
IllegalArgumentException:
if level is outside the allowable range