75
JavaFX MotionBlur Effect
MotionBlur is similar to the gaussian blur effect. The motion blur effect is also used to blur the nodes. The only difference between the Gaussian Blur effect and MotionBlur effect is that the motionblur effect uses the specified angle with which the nodes is to be blurred.
As its name suggests, by applying this effect, the node is seen to be in the motion. The class javafx.scene.effect.MotionBlur represents the motionblur effect. This class needs to be instantiated in order to generate the appropriate effect.
Properties
The properties of the class along with the setter methods are described below in the table.
Property | Description | Setter Methods |
---|---|---|
angle | It represents the angle of the motion effect. It is a double type property. | setAngle(Double value) |
input | It represents the input for the effect. It is an Effect object type property. | setInput(Effect value) |
radius | It represents the radius of the blur kernel. It is a double type property. | setRadius(Double radius) |
Constructors
It contains two constructors described below.
- public MotionBlur() : instantiates the motionblur class with the default parameters.
- public MotionBlur(double angle, double radius) : instantiates MotionBlur class with the specified angle and radius.
Example:
Next TopicJavaFX Reflection Effect