In the recipe Adding depth with lighting and shadow effects, we introduced several effect classes that are available in JavaFX. The Text node can receive any one of these effects to produce stunning text effects. You can, however, go beyond the available effects to produce your own text effects by combining available Node operations and effects. In this recipe, we are going to combine what we have learned in the second chapter's constructive area geometry operations, and the effects covered in this chapter, to create a text cut-out effect.
As mentioned in the introduction, this recipe combines concepts from constructive area geometry covered in the recipe Creating shapes with constructive area geometry from Chapter 2, Creating JavaFX Applications, and the Effect classes covered earlier in this chapter to create new text effects. Hence, if you are not familiar with any of these topics, it will be helpful to review them before continuing.