Example usage for javafx.scene.effect BlendMode MULTIPLY

List of usage examples for javafx.scene.effect BlendMode MULTIPLY

Introduction

In this page you can find the example usage for javafx.scene.effect BlendMode MULTIPLY.

Prototype

BlendMode MULTIPLY

To view the source code for javafx.scene.effect BlendMode MULTIPLY.

Click Source Link

Document

The color components from the first input are multiplied with those from the second input.

Usage

From source file:Main.java

static Node blendMode() {
    Rectangle r = new Rectangle();
    r.setX(590);/*w w w. j  av a  2 s  .  c o m*/
    r.setY(50);
    r.setWidth(50);
    r.setHeight(50);
    r.setFill(Color.BLUE);

    Circle c = new Circle();
    c.setFill(Color.rgb(255, 0, 0, 0.5f));
    c.setCenterX(590);
    c.setCenterY(50);
    c.setRadius(25);

    Group g = new Group();
    g.setBlendMode(BlendMode.MULTIPLY);
    g.getChildren().add(r);
    g.getChildren().add(c);
    return g;
}