package jira;
//package test.scenegraph.app;

import javafx.application.Application;
import javafx.scene.Group;
import javafx.scene.Scene;
import javafx.scene.canvas.Canvas;
import javafx.scene.canvas.GraphicsContext;
import javafx.scene.effect.Reflection;
import javafx.scene.effect.Shadow;
import javafx.scene.layout.VBox;
import javafx.scene.paint.Color;
import javafx.scene.text.Font;
import javafx.scene.text.Text;
import javafx.stage.Stage;

public class RT31167 extends Application {
    public static void main(String[] args) {
        Application.launch(args);
    }

    @Override
    public void start(Stage stage) {
        Group root = new Group();
        Scene scene = new Scene(root, 600, 450);
        stage.setScene(scene);
        stage.show();

        final Canvas canvas = new Canvas(270, 270);
        GraphicsContext gc = canvas.getGraphicsContext2D();

        gc.setEffect(new Reflection());
        //gc.setEffect(new Shadow() {{ setWidth(30); }});
        //gc.stroke();
        gc.setFill(Color.RED);
        gc.setFont(new Font(36));
        gc.fillText("TEXT!", 40, 80);

        Text t = new Text();
        t.setText("TEXT!");
        t.setX(140);
        t.setY(80);
        t.setEffect(new Reflection());
        //t.setEffect(new Shadow() {{ setWidth(30); }});
        t.setFont(new Font(36));
        t.setFill(Color.BLUE);

        //gc.setEffect(new Shadow() {{ setWidth(30); }});
        //gc.stroke();
        gc.setStroke(Color.RED);
        gc.setFont(new Font(36));
        gc.setLineWidth(10);
        gc.strokeText("TEXT!", 40, 180);

        Text t2 = new Text();
        t2.setText("TEXT!");
        t2.setX(140);
        t2.setY(180);
        t2.setEffect(new Reflection());
        //t2.setEffect(new Shadow() {{ setWidth(30); }});
        t2.setFont(new Font(36));
        t2.setFill(null);
        t2.setStroke(Color.BLUE);
        t2.setStrokeWidth(10);

        root.getChildren().addAll(canvas, t, t2);
    }
}