Example usage for javafx.scene.effect MotionBlur MotionBlur

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

Introduction

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

Prototype

public MotionBlur() 

Source Link

Document

Creates a new instance of MotionBlur with default parameters.

Usage

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);/*from   www  .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();
}

From source file:Main.java

static Node motionBlur() {
    Text t = new Text();
    t.setX(20.0f);//from   w w w. jav 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;
}