Java Reference
In-Depth Information
Then, apply a GaussianBlur effect to the triangle as demonstrated in Figure 6.14.
Figure 6.14
GaussianBlur Applied to Triangle
Here's the JavaFX code snippet.
Polygon {
points : [
10, 190,
10, 110
150, 190
]
fill: Color.BLACK
effect : GaussianBlur { radius: 15 }
}
Finally, let's add this shape to our cone found in Figure 6.11 to produce the
image displayed in Figure 6.15.
Figure 6.15
Cone with GaussianBlur Shadow
MotionBlur
MotionBlur allows you to employ a blur effect in a particular direction, in
essence, simulating motion. This can be brought about by adding an instance
variable, called angle , which is stated in degrees, to control the direction of the
blur. The following block of code defines a series of chevron shapes in succes-
Search WWH ::




Custom Search