Example:
MotionBlur motionBlur = new MotionBlur();
motionBlur.setRadius(30);
motionBlur.setAngle(-15.0);
Text text = new Text();
text.setX(20.0);
text.setY(100.0);
text.setText("Motion!");
text.setFill(Color.web("0x3b596d"));
text.setFont(Font.font(null, FontWeight.BOLD, 60));
text.setEffect(motionBlur);
The code above produces the following:
| Modifier and Type | Field and Description |
|---|---|
| private DoubleProperty | angle
The angle of the motion effect, in degrees. |
| private ObjectProperty | input
The input for this |
| private DoubleProperty | radius
The radius of the blur kernel. |
| Access | Constructor and Description |
|---|---|
| public | |
| public | MotionBlur(double
the angle of the motion effect, in degrees angle, double the radius of the blur kernel radius)Creates a new instance of MotionBlur with the specified angle and radius. |
| Modifier and Type | Method and Description |
|---|---|
| public final DoubleProperty | |
| pack-priv boolean | |
| pack-priv Effect | |
| pack-priv MotionBlur | |
| public final double | |
| pack-priv BaseBounds | getBounds(BaseBounds bounds, BaseTransform tx, Node node, BoundsAccessor boundsAccessor)
Implements abstract javafx. Returns bounds of given node with applied effect. |
| private float | |
| private int | |
| public final Effect | |
| public final double | |
| private int | |
| public final ObjectProperty | |
| public final DoubleProperty | |
| public final void | |
| public final void | |
| public final void | |
| pack-priv void |
| angle | back to summary |
|---|---|
| private DoubleProperty angle The angle of the motion effect, in degrees.
Min: n/a
Max: n/a
Default: 0.0
Identity: n/a
| |
| input | back to summary |
|---|---|
| private ObjectProperty<Effect> input The input for this
| |
| radius | back to summary |
|---|---|
| private DoubleProperty radius The radius of the blur kernel.
Min: 0.0
Max: 63.0
Default: 10.0
Identity: 0.0
| |
| MotionBlur | back to summary |
|---|---|
| public MotionBlur() Creates a new instance of MotionBlur with default parameters. | |
| MotionBlur | back to summary |
|---|---|
| public MotionBlur(double angle, double radius) Creates a new instance of MotionBlur with the specified angle and radius.
| |
| angleProperty | back to summary |
|---|---|
| public final DoubleProperty angleProperty() | |
| 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 MotionBlur createPeer() Implements abstract javafx.
| |
| getAngle | back to summary |
|---|---|
| public final double getAngle() | |
| 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.
| |
| getClampedRadius | back to summary |
|---|---|
| private float getClampedRadius() | |
| getHPad | back to summary |
|---|---|
| private int getHPad() | |
| getInput | back to summary |
|---|---|
| public final Effect getInput() | |
| getRadius | back to summary |
|---|---|
| public final double getRadius() | |
| getVPad | back to summary |
|---|---|
| private int getVPad() | |
| inputProperty | back to summary |
|---|---|
| public final ObjectProperty | |
| radiusProperty | back to summary |
|---|---|
| public final DoubleProperty radiusProperty() | |
| setAngle | back to summary |
|---|---|
| public final void setAngle(double value) | |
| setInput | back to summary |
|---|---|
| public final void setInput(Effect value) | |
| setRadius | back to summary |
|---|---|
| public final void setRadius(double value) | |
| update | back to summary |
|---|---|
| pack-priv void update() Implements abstract javafx.
| |