Overview
A blur effect using a simple box filter kernel, with separately configurable sizes in both dimensions, and an iteration parameter that contols the quality of the resulting blur.
the code:
import javafx.scene.*;
import javafx.scene.text.*;
import javafx.scene.paint.*;
import javafx.scene.effect.*;
Text {
effect: BoxBlur { width: 15 height: 15 iterations: 3 }
cache: true
x: 10 y: 40
content: "Blurry Text"
fill: Color.RED
font: Font.font(null, FontWeight.BOLD, 36);
}
produces:
Profile: desktop
Variable Summary
access | name | type | Can Read | Can Init | Can Write | Default Value | description |
---|---|---|---|---|---|---|---|
public | height | Number | 5.0 |
The vertical dimension of the blur effect. The vertical dimension of the blur effect. The color information for a given pixel will be spread across a Box of the indicated height centered over the pixel. Values less than or equal to 1 will not spread the color data beyond the pixel where it originated from and so will have no effect. Min: 0.0 Max: 255.0 Default: 5.0 Identity: <1.05.0 |
|||
public | input | Effect | null |
The input for this The input for this |
|||
public | iterations | Integer | 1 |
The number of times to iterate the blur effect to improve its "quality" or "smoothness". The number of times to iterate the blur effect to improve its "quality" or "smoothness". Iterating the effect 3 times approximates the quality of a Gaussian Blur to within 3%. Min: 0 Max: 3 Default: 1 Identity: 01 |
|||
public | width | Number | 5.0 |
The horizontal dimension of the blur effect. The horizontal dimension of the blur effect. The color information for a given pixel will be spread across a Box of the indicated width centered over the pixel. Values less than or equal to 1 will not spread the color data beyond the pixel where it originated from and so will have no effect. Min: 0.0 Max: 255.0 Default: 5.0 Identity: <1.05.0 |
Inherited Variables
Function Summary
- public impl_getImpl() : com.sun.scenario.effect.Effect
Inherited Functions
javafx.scene.effect.Effect
- public getAccelType(config: java.lang.Object) : java.lang.String
-
Returns a
String
representing the type of hardware acceleration, if any, that is used when applying thisEffect
on the givenGraphicsConfiguration
.Returns a
String
representing the type of hardware acceleration, if any, that is used when applying thisEffect
on the givenGraphicsConfiguration
. This method is intended for informational or debugging purposes only.-
Parameters
- config
-
Returns
- String
- public impl_add(node: Node) : Void
- public abstract impl_getImpl() : com.sun.scenario.effect.Effect
- public impl_remove(node: Node) : Void