JavaFX graphics performance and suitability for advanced animations

Richard Bair richard.bair at oracle.com
Fri May 31 17:02:37 PDT 2013


>> The text in PowerPoint is very likely outlines (treat the text as shapes) since there isn't much text per slide and its usually very large (in fact most render engines stop rendering text as glyphs at a given size -- for us it is > 80pt.). Hmmmm. I wonder if you used an 81pt font and scaled it down what that would look like?
> 
> Well, I tried it, and it wasn't pretty: https://javafx-jira.kenai.com/browse/RT-30862

This, however, is beautiful. How does it look on your system.

        final StackPane rootPane = new StackPane();

        Text text = new Text("This is a text node");
        text.setFont(Font.font(Font.getDefault().getFamily(), 81));
        ScaleTransition scale = new ScaleTransition(Duration.seconds(5), text);
        scale.setCycleCount(Animation.INDEFINITE);
        scale.setAutoReverse(true);
        scale.setFromX(1);
        scale.setFromY(1);
        scale.setToX(10);
        scale.setToY(10);
        scale.play();
        rootPane.getChildren().add(text);

        Scene scene = new Scene(rootPane, 1200, 800);
        stage.setScene(scene);
        stage.show();



More information about the openjfx-dev mailing list