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:
| Modifier and Type | Field and Description |
|---|---|
| private ObjectProperty | input
The input for this |
| private DoubleProperty | level
The level value, which controls the intensity of the sepia effect. |
| Access | Constructor and Description |
|---|---|
| public | |
| public | SepiaTone(double
the level value, which controls the intensity of the effect level)Creates a new instance of SepiaTone with the specified level. |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv boolean | |
| pack-priv Effect | |
| pack-priv SepiaTone | |
| pack-priv BaseBounds | getBounds(BaseBounds bounds, BaseTransform tx, Node node, BoundsAccessor boundsAccessor)
Implements abstract javafx. Returns bounds of given node with applied effect. |
| public final Effect | |
| public final double | |
| public final ObjectProperty | |
| public final DoubleProperty | |
| public final void | |
| public final void | |
| pack-priv void |
| input | back to summary |
|---|---|
| private ObjectProperty<Effect> input The input for this
| |
| level | back to summary |
|---|---|
| private DoubleProperty level The level value, which controls the intensity of the sepia effect.
Min: 0.0f
Max: 1.0f
Default: 1.0f
Identity: 0.0f
| |
| SepiaTone | back to summary |
|---|---|
| public SepiaTone() Creates a new instance of SepiaTone with default parameters. | |
| SepiaTone | back to summary |
|---|---|
| public SepiaTone(double level) Creates a new instance of SepiaTone with the specified level.
| |
| checkChainContains | back to summary |
|---|---|
| pack-priv boolean checkChainContains(Effect e) Implements abstract javafx.
| |
| copy | back to summary |
|---|---|
| pack-priv Effect copy() Implements abstract javafx.
| |
| createPeer | back to summary |
|---|---|
| pack-priv SepiaTone createPeer() Implements abstract javafx.
| |
| getBounds | back to summary |
|---|---|
| pack-priv BaseBounds getBounds(BaseBounds bounds, BaseTransform tx, Node node, BoundsAccessor boundsAccessor) Implements abstract javafx. Doc from javafx. Returns bounds of given node with applied effect. We *never* pass null in as a bounds. This method will NOT take a null bounds object. The returned value may be the same bounds object passed in, or it may be a new object.
| |
| getInput | back to summary |
|---|---|
| public final Effect getInput() | |
| getLevel | back to summary |
|---|---|
| public final double getLevel() | |
| inputProperty | back to summary |
|---|---|
| public final ObjectProperty | |
| levelProperty | back to summary |
|---|---|
| public final DoubleProperty levelProperty() | |
| setInput | back to summary |
|---|---|
| public final void setInput(Effect value) | |
| setLevel | back to summary |
|---|---|
| public final void setLevel(double value) | |
| update | back to summary |
|---|---|
| pack-priv void update() Implements abstract javafx.
| |