Example usage for javafx.scene.effect MotionBlur setAngle

List of usage examples for javafx.scene.effect MotionBlur setAngle

Introduction

In this page you can find the example usage for javafx.scene.effect MotionBlur setAngle.

Prototype

public final void setAngle(double value) 

Source Link

Usage

From source file:Main.java

static Node motionBlur() {
    Text t = new Text();
    t.setX(20.0f);//ww w  .j a v  a 2s .c  om
    t.setY(80.0f);
    t.setText("Motion Blur");
    t.setFill(Color.RED);
    t.setFont(Font.font("null", FontWeight.BOLD, 60));

    MotionBlur mb = new MotionBlur();
    mb.setRadius(15.0f);
    mb.setAngle(45.0f);

    t.setEffect(mb);

    t.setTranslateX(520);
    t.setTranslateY(100);

    return t;
}

From source file:Main.java

@Override
public void start(Stage stage) {
    Text text = new Text("Transparent!");
    text.setFont(new Font(40));

    MotionBlur mb = new MotionBlur();
    mb.setRadius(15.0);/* ww  w .j a va2 s  .co m*/
    mb.setAngle(-30.0);

    text.setEffect(mb);

    VBox box = new VBox();
    box.getChildren().add(text);
    final Scene scene = new Scene(box, 300, 250);
    scene.setFill(null);
    stage.setScene(scene);
    stage.show();
}