public class MotionBlur extends Effect
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:
Effect.EffectInputChangeListener, Effect.EffectInputProperty
Modifier and Type | Field and Description |
---|---|
private DoubleProperty |
angle
The angle of the motion effect, in degrees.
|
private ObjectProperty<Effect> |
input
The input for this
Effect . |
private DoubleProperty |
radius
The radius of the blur kernel.
|
Constructor and Description |
---|
MotionBlur()
Creates a new instance of MotionBlur with default parameters.
|
MotionBlur(double angle,
double radius)
Creates a new instance of MotionBlur with the specified angle and radius.
|
Modifier and Type | Method and Description |
---|---|
DoubleProperty |
angleProperty() |
double |
getAngle() |
private float |
getClampedRadius() |
private int |
getHPad() |
Effect |
getInput() |
double |
getRadius() |
private int |
getVPad() |
(package private) boolean |
impl_checkChainContains(Effect e) |
Effect |
impl_copy()
Deprecated.
This is an internal API that is not intended for use and will be removed in the next version
|
(package private) MotionBlur |
impl_createImpl() |
BaseBounds |
impl_getBounds(BaseBounds bounds,
BaseTransform tx,
Node node,
BoundsAccessor boundsAccessor)
Deprecated.
This is an internal API that is not intended for use and will be removed in the next version
|
(package private) void |
impl_update() |
ObjectProperty<Effect> |
inputProperty() |
DoubleProperty |
radiusProperty() |
void |
setAngle(double value) |
void |
setInput(Effect value) |
void |
setRadius(double value) |
effectBoundsChanged, getInputBounds, getKernelSize, getShadowBounds, impl_containsCycles, impl_effectDirtyProperty, impl_getImpl, impl_isEffectDirty, impl_sync, markDirty, transformBounds
private ObjectProperty<Effect> 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 radius
Min: 0.0 Max: 63.0 Default: 10.0 Identity: 0.0
private DoubleProperty angle
Min: n/a Max: n/a Default: 0.0 Identity: n/a
public MotionBlur()
public MotionBlur(double angle, double radius)
angle
- the angle of the motion effect, in degreesradius
- the radius of the blur kernelMotionBlur impl_createImpl()
impl_createImpl
in class Effect
public final void setInput(Effect value)
public final Effect getInput()
public final ObjectProperty<Effect> inputProperty()
boolean impl_checkChainContains(Effect e)
impl_checkChainContains
in class Effect
public final void setRadius(double value)
public final double getRadius()
public final DoubleProperty radiusProperty()
public final void setAngle(double value)
public final double getAngle()
public final DoubleProperty angleProperty()
private float getClampedRadius()
void impl_update()
impl_update
in class Effect
private int getHPad()
private int getVPad()
@Deprecated public BaseBounds impl_getBounds(BaseBounds bounds, BaseTransform tx, Node node, BoundsAccessor boundsAccessor)
Effect
impl_getBounds
in class Effect