JavaFX GaussianBlur Effect

GaussianBlur Effect is very much similar to BoxBlur effect. The only difference between the both is that the GaussianBlur effect uses a Gaussian convolution kernel to blur the nodes. However, JavaFX provides the class javafx.scene.effect.GaussianBlur to implement GaussianBlur on the nodes. This class needs to be instantiated in order to apply an appropriate effect on the node.

Properties

The properties of the class along with the setter methods are described in the following table.

PropertyDescriptionSetter Methods
inputThis property is of effect type. It represents the input for the effect.setInput(Effect value)
radiusThis property is of double type. It represents the radius of the blur kernel.setRadius(Double value)

Constructors

The class contains two constructors.

  1. public GaussianBlur() : creates the new instance with the default value of parameters.
  2. public GaussianBlur(double radius) : creates a new instance with the specified value of parameters.

Example:


JavaFX GaussianBlur Effect



Latest Courses