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:
Type | Property and Description |
---|---|
DoubleProperty |
angle
The angle of the motion effect, in degrees.
|
<any> |
input
The input for this
Effect . |
DoubleProperty |
radius
The radius of the blur kernel.
|
Effect.EffectInputChangeListener, Effect.EffectInputProperty
Modifier and Type | Field and Description |
---|---|
private DoubleProperty |
angle
The angle of the motion effect, in degrees.
|
private <any> |
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()
The angle of the motion effect, in degrees.
|
(package private) boolean |
checkChainContains(Effect e) |
(package private) Effect |
copy() |
(package private) com.sun.scenario.effect.MotionBlur |
createPeer() |
double |
getAngle()
Gets the value of the property angle.
|
(package private) BaseBounds |
getBounds(BaseBounds bounds,
BaseTransform tx,
Node node,
BoundsAccessor boundsAccessor)
Returns bounds of given node with applied effect.
|
private float |
getClampedRadius() |
private int |
getHPad() |
Effect |
getInput()
Gets the value of the property input.
|
double |
getRadius()
Gets the value of the property radius.
|
private int |
getVPad() |
<any> |
inputProperty()
The input for this
Effect . |
DoubleProperty |
radiusProperty()
The radius of the blur kernel.
|
void |
setAngle(double value)
Sets the value of the property angle.
|
void |
setInput(Effect value)
Sets the value of the property input.
|
void |
setRadius(double value)
Sets the value of the property radius.
|
(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 radiusProperty
Min: 0.0 Max: 63.0 Default: 10.0 Identity: 0.0
getRadius()
,
setRadius(double)
public final DoubleProperty angleProperty
Min: n/a Max: n/a Default: 0.0 Identity: n/a
getAngle()
,
setAngle(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 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 kernelcom.sun.scenario.effect.MotionBlur 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 setRadius(double value)
public final double getRadius()
public final DoubleProperty radiusProperty()
Min: 0.0 Max: 63.0 Default: 10.0 Identity: 0.0
getRadius()
,
setRadius(double)
public final void setAngle(double value)
public final double getAngle()
public final DoubleProperty angleProperty()
Min: n/a Max: n/a Default: 0.0 Identity: n/a
getAngle()
,
setAngle(double)
private float getClampedRadius()
private int getHPad()
private int getVPad()
BaseBounds getBounds(BaseBounds bounds, BaseTransform tx, Node node, BoundsAccessor boundsAccessor)
Effect