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

public Class ColorAdjust

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 allows for per-pixel adjustments of hue, saturation, brightness, and contrast.

Field Summary

Modifier and TypeField and Description
private float
private float
private float
private float

Constructor Summary

AccessConstructor and Description
public
ColorAdjust()

Constructs a new ColorAdjust effect with the default hue (0.0), saturation (0.0), brightness (0.0), and contrast (1.0), using the default input for source data.

public
ColorAdjust(Effect
the single input Effect
input
)

Constructs a new ColorAdjust effect with the default hue (0.0), saturation (0.0), brightness (0.0), and contrast (0.0).

Method Summary

Modifier and TypeMethod and Description
public float

Returns:

the brightness adjustment
getBrightness
()

Returns the brightness adjustment.

public float

Returns:

the contrast adjustment
getContrast
()

Returns the contrast adjustment.

public float

Returns:

the hue adjustment
getHue
()

Returns the hue adjustment.

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 saturation adjustment
getSaturation
()

Returns the saturation adjustment.

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
setBrightness(float
the brightness adjustment
brightness
)

Sets the brightness adjustment.

public void
setContrast(float
the contrast adjustment
contrast
)

Sets the contrast adjustment.

public void
setHue(float
the hue adjustment
hue
)

Sets the hue adjustment.

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
setSaturation(float
the saturation adjustment
saturation
)

Sets the saturation adjustment.

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

Field Detail

brightnessback to summary
private float brightness
contrastback to summary
private float contrast
hueback to summary
private float hue
saturationback to summary
private float saturation

Constructor Detail

ColorAdjustback to summary
public ColorAdjust()

Constructs a new ColorAdjust effect with the default hue (0.0), saturation (0.0), brightness (0.0), and contrast (1.0), using the default input for source data. This is a shorthand equivalent to:

    new ColorAdjust(DefaultInput)
ColorAdjustback to summary
public ColorAdjust(Effect input)

Constructs a new ColorAdjust effect with the default hue (0.0), saturation (0.0), brightness (0.0), and contrast (0.0).

Parameters
input:Effect

the single input Effect

Method Detail

getBrightnessback to summary
public float getBrightness()

Returns the brightness adjustment.

Returns:float

the brightness adjustment

getContrastback to summary
public float getContrast()

Returns the contrast adjustment.

Returns:float

the contrast adjustment

getHueback to summary
public float getHue()

Returns the hue adjustment.

Returns:float

the hue adjustment

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
getSaturationback to summary
public float getSaturation()

Returns the saturation adjustment.

Returns:float

the saturation adjustment

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
setBrightnessback to summary
public void setBrightness(float brightness)

Sets the brightness adjustment.

      Min: -1.0
      Max: +1.0
  Default:  0.0
 Identity:  0.0
Parameters
brightness:float

the brightness adjustment

Exceptions
IllegalArgumentException:
if brightness is outside the allowable range
setContrastback to summary
public void setContrast(float contrast)

Sets the contrast adjustment.

      Min: -1.0
      Max: +1.0
  Default:  0.0
 Identity:  0.0
Parameters
contrast:float

the contrast adjustment

Exceptions
IllegalArgumentException:
if contrast is outside the allowable range
setHueback to summary
public void setHue(float hue)

Sets the hue adjustment.

      Min: -1.0
      Max: +1.0
  Default:  0.0
 Identity:  0.0
Parameters
hue:float

the hue adjustment

Exceptions
IllegalArgumentException:
if hue is outside the allowable range
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

Exceptions
IllegalArgumentException:
if input is null
setSaturationback to summary
public void setSaturation(float saturation)

Sets the saturation adjustment.

      Min: -1.0
      Max: +1.0
  Default:  0.0
 Identity:  0.0
Parameters
saturation:float

the saturation adjustment

Exceptions
IllegalArgumentException:
if saturation is outside the allowable range