public class SepiaTone extends Effect
Example:
SepiaTone sepiaTone = new SepiaTone();
sepiaTone.setLevel(0.7);
Image image = new Image("boat.jpg");
ImageView imageView = new ImageView(image);
imageView.setFitWidth(200);
imageView.setPreserveRatio(true);
imageView.setEffect(sepiaTone);
The code above applied on this image:
produces the following:
Type | Property and Description |
---|---|
<any> |
input
The input for this
Effect . |
DoubleProperty |
level
The level value, which controls the intensity of the sepia effect.
|
Effect.EffectInputChangeListener, Effect.EffectInputProperty
Modifier and Type | Field and Description |
---|---|
private <any> |
input
The input for this
Effect . |
private DoubleProperty |
level
The level value, which controls the intensity of the sepia effect.
|
Constructor and Description |
---|
SepiaTone()
Creates a new instance of SepiaTone with default parameters.
|
SepiaTone(double level)
Creates a new instance of SepiaTone with the specified level.
|
Modifier and Type | Method and Description |
---|---|
(package private) boolean |
checkChainContains(Effect e) |
(package private) Effect |
copy() |
(package private) com.sun.scenario.effect.SepiaTone |
createPeer() |
(package private) BaseBounds |
getBounds(BaseBounds bounds,
BaseTransform tx,
Node node,
BoundsAccessor boundsAccessor)
Returns bounds of given node with applied effect.
|
Effect |
getInput()
Gets the value of the property input.
|
double |
getLevel()
Gets the value of the property level.
|
<any> |
inputProperty()
The input for this
Effect . |
DoubleProperty |
levelProperty()
The level value, which controls the intensity of the sepia effect.
|
void |
setInput(Effect value)
Sets the value of the property input.
|
void |
setLevel(double value)
Sets the value of the property level.
|
(package private) void |
update() |
containsCycles, effectBoundsChanged, getInputBounds, getKernelSize, getPeer, getShadowBounds, markDirty, sync, transformBounds
public final <any> inputProperty
Effect
.
If set to null
, or left unspecified, a graphical image of
the Node
to which the Effect
is attached will be
used as the input.getInput()
,
setInput(Effect)
public final DoubleProperty levelProperty
Min: 0.0f Max: 1.0f Default: 1.0f Identity: 0.0f
getLevel()
,
setLevel(double)
private <any> input
Effect
.
If set to null
, or left unspecified, a graphical image of
the Node
to which the Effect
is attached will be
used as the input.private DoubleProperty level
Min: 0.0f Max: 1.0f Default: 1.0f Identity: 0.0f
public SepiaTone()
public SepiaTone(double level)
level
- the level value, which controls the intensity of the effectcom.sun.scenario.effect.SepiaTone createPeer()
createPeer
in class Effect
public final void setInput(Effect value)
public final Effect getInput()
public final <any> inputProperty()
Effect
.
If set to null
, or left unspecified, a graphical image of
the Node
to which the Effect
is attached will be
used as the input.getInput()
,
setInput(Effect)
boolean checkChainContains(Effect e)
checkChainContains
in class Effect
public final void setLevel(double value)
public final double getLevel()
public final DoubleProperty levelProperty()
Min: 0.0f Max: 1.0f Default: 1.0f Identity: 0.0f
getLevel()
,
setLevel(double)
BaseBounds getBounds(BaseBounds bounds, BaseTransform tx, Node node, BoundsAccessor boundsAccessor)
Effect