Blending is a way to merge two inputs with different modes. The input can be a ColorInput, an image, or a regular node. There are 17 different modes of merging. It's hard to find a use case for all of them so I will review only the most often used subset.
Using blend effects
Cutting out with the SRC_ATOP blend mode
This blend mode draws only part of the top input lying inside the node it's applied to. By using this, you can get nice clipping effect:
Here, we used the same cosmonaut image as a fill for the "JavaFX" text:
// chapter8/combining/BlendSrcDemo.java
public void start(Stage primaryStage) {
Image image = new Image(
"https://github.com/sgrinev/mastering-javafx-9-book/blob/master/resources...