Example usage for javafx.scene.effect MotionBlur setRadius

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

Introduction

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

Prototype

public final void setRadius(double value) 

Source Link

Usage

From source file:Main.java

static Node motionBlur() {
    Text t = new Text();
    t.setX(20.0f);/*from   w w w . ja  v  a2s .  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);
    mb.setAngle(-30.0);//from  w w w .j  a  va  2s.  c o m

    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();
}