|
Spec-Zone .ru
спецификации, руководства, описания, API
|
public class Blend extends Effect
BlendModes.
import javafx.scene.*;
import javafx.scene.effect.*;
import javafx.scene.paint.*;
import javafx.scene.shape.*;
import javafx.scene.text.*;
Blend blend = new Blend();
blend.setMode(BlendMode.MULTIPLY);
ColorInput colorInput = new ColorInput();
colorInput.setPaint(Color.BLUE);
colorInput.setX(10);
colorInput.setY(10);
colorInput.setWidth(160);
colorInput.setHeight(80);
blend.setTopInput(colorInput);
Rectangle r = new Rectangle();
r.setWidth(180);
r.setHeight(100);
Stop[] stops = new Stop[] {new Stop(0, Color.RED), new Stop(1, Color.YELLOW)};
LinearGradient lg = new LinearGradient(0, 0, 0.25, 0.25, true, CycleMethod.REFLECT, stops);
r.setFill(lg);
Text t = new Text();
t.setEffect(blend);
t.setX(25);
t.setY(65);
t.setFill(Color.RED);
t.setText("SrcOut");
t.setFont(Font.font(null, FontWeight.BOLD, 36));
Group g = new Group();
g.getChildren().add(r);
g.getChildren().add(t);
| Type | Property and Description |
|---|---|
ObjectProperty<Effect> |
bottomInput
The bottom input for this
Blend operation. |
ObjectProperty<BlendMode> |
mode
The
BlendMode used to blend the two inputs together. |
DoubleProperty |
opacity
The opacity value, which is modulated with the top input prior
to blending.
|
ObjectProperty<Effect> |
topInput
The top input for this
Blend operation. |
| Constructor and Description |
|---|
Blend() |
| Modifier and Type | Method and Description |
|---|---|
ObjectProperty<Effect> |
bottomInputProperty()
The bottom input for this
Blend operation. |
Effect |
getBottomInput()
The bottom input for this
Blend operation. |
BlendMode |
getMode()
The
BlendMode used to blend the two inputs together. |
double |
getOpacity()
The opacity value, which is modulated with the top input prior
to blending.
|
Effect |
getTopInput()
The top input for this
Blend operation. |
ObjectProperty<BlendMode> |
modeProperty()
The
BlendMode used to blend the two inputs together. |
DoubleProperty |
opacityProperty()
The opacity value, which is modulated with the top input prior
to blending.
|
void |
setBottomInput(Effect value)
The bottom input for this
Blend operation. |
void |
setMode(BlendMode value)
The
BlendMode used to blend the two inputs together. |
void |
setOpacity(double value)
The opacity value, which is modulated with the top input prior
to blending.
|
void |
setTopInput(Effect value)
The top input for this
Blend operation. |
ObjectProperty<Effect> |
topInputProperty()
The top input for this
Blend operation. |
BlendMode used to blend the two inputs together.
Min: n/a
Max: n/a
Default: BlendMode.SRC_OVER
Identity: n/a
getMode(),
setMode(BlendMode)
Min: 0.0
Max: 1.0
Default: 1.0
Identity: 1.0
getOpacity(),
setOpacity(double)Blend operation.
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.getBottomInput(),
setBottomInput(Effect)Blend operation.
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.getTopInput(),
setTopInput(Effect)public final void setMode(BlendMode value)
BlendMode used to blend the two inputs together.
Min: n/a
Max: n/a
Default: BlendMode.SRC_OVER
Identity: n/a
public final BlendMode getMode()
BlendMode used to blend the two inputs together.
Min: n/a
Max: n/a
Default: BlendMode.SRC_OVER
Identity: n/a
public final ObjectProperty<BlendMode> modeProperty()
BlendMode used to blend the two inputs together.
Min: n/a
Max: n/a
Default: BlendMode.SRC_OVER
Identity: n/a
getMode(),
setMode(BlendMode)public final void setOpacity(double value)
Min: 0.0
Max: 1.0
Default: 1.0
Identity: 1.0
public final double getOpacity()
Min: 0.0
Max: 1.0
Default: 1.0
Identity: 1.0
public final DoubleProperty opacityProperty()
Min: 0.0
Max: 1.0
Default: 1.0
Identity: 1.0
getOpacity(),
setOpacity(double)public final void setBottomInput(Effect value)
Blend operation.
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.public final Effect getBottomInput()
Blend operation.
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.public final ObjectProperty<Effect> bottomInputProperty()
Blend operation.
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.getBottomInput(),
setBottomInput(Effect)public final void setTopInput(Effect value)
Blend operation.
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.public final Effect getTopInput()
Blend operation.
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.public final ObjectProperty<Effect> topInputProperty()
Blend operation.
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.getTopInput(),
setTopInput(Effect)Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. Use is subject to .