java.lang.Object
javafx.scene.effect.Effect
javafx.scene.effect.GaussianBlur
A blur effect using a Gaussian convolution kernel, with a configurable
radius.
Example:
Text text = new Text();
text.setText("Blurry Text!");
text.setFill(Color.web("0x3b596d"));
text.setFont(Font.font(null, FontWeight.BOLD, 50));
text.setX(10);
text.setY(50);
text.setEffect(new GaussianBlur());
The code above produces the following:
- Since:
- JavaFX 2.0
-
Property Summary
PropertiesTypePropertyDescriptionfinal ObjectProperty<Effect> The input for thisEffect.final DoublePropertyThe radius of the blur kernel. -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new instance of GaussianBlur with default parameters.GaussianBlur(double radius) Creates a new instance of GaussianBlur with the specified radius. -
Method Summary
Modifier and TypeMethodDescriptionfinal EffectgetInput()Gets the value of theinputproperty.final doubleGets the value of theradiusproperty.final ObjectProperty<Effect> The input for thisEffect.final DoublePropertyThe radius of the blur kernel.final voidSets the value of theinputproperty.final voidsetRadius(double value) Sets the value of theradiusproperty.
-
Property Details
-
input
The input for thisEffect. If set tonull, or left unspecified, a graphical image of theNodeto which theEffectis attached will be used as the input.- Default value:
- null
- See Also:
-
radius
The radius of the blur kernel.Min: 0.0 Max: 63.0 Default: 10.0 Identity: 0.0- Default value:
- 10.0
- See Also:
-
-
Constructor Details
-
GaussianBlur
public GaussianBlur()Creates a new instance of GaussianBlur with default parameters. -
GaussianBlur
public GaussianBlur(double radius) Creates a new instance of GaussianBlur with the specified radius.- Parameters:
radius- the radius of the blur kernel- Since:
- JavaFX 2.1
-
-
Method Details
-
setInput
Sets the value of theinputproperty.- Property description:
- The input for this
Effect. If set tonull, or left unspecified, a graphical image of theNodeto which theEffectis attached will be used as the input. - Default value:
- null
- Parameters:
value- the value for theinputproperty- See Also:
-
getInput
Gets the value of theinputproperty.- Property description:
- The input for this
Effect. If set tonull, or left unspecified, a graphical image of theNodeto which theEffectis attached will be used as the input. - Default value:
- null
- Returns:
- the value of the
inputproperty - See Also:
-
inputProperty
The input for thisEffect. If set tonull, or left unspecified, a graphical image of theNodeto which theEffectis attached will be used as the input.- Default value:
- null
- Returns:
- the
inputproperty - See Also:
-
setRadius
public final void setRadius(double value) Sets the value of theradiusproperty.- Property description:
- The radius of the blur kernel.
Min: 0.0 Max: 63.0 Default: 10.0 Identity: 0.0 - Default value:
- 10.0
- Parameters:
value- the value for theradiusproperty- See Also:
-
getRadius
public final double getRadius()Gets the value of theradiusproperty.- Property description:
- The radius of the blur kernel.
Min: 0.0 Max: 63.0 Default: 10.0 Identity: 0.0 - Default value:
- 10.0
- Returns:
- the value of the
radiusproperty - See Also:
-
radiusProperty
The radius of the blur kernel.Min: 0.0 Max: 63.0 Default: 10.0 Identity: 0.0- Default value:
- 10.0
- Returns:
- the
radiusproperty - See Also:
-