Example usage for javafx.scene Group setBlendMode

List of usage examples for javafx.scene Group setBlendMode

Introduction

In this page you can find the example usage for javafx.scene Group setBlendMode.

Prototype

public final void setBlendMode(BlendMode value) 

Source Link

Usage

From source file:Main.java

static Node blendMode() {
    Rectangle r = new Rectangle();
    r.setX(590);/*from w w w .  j a va  2 s. c  om*/
    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;
}