JavaFX graphics performance and suitability for advanced animations
Richard Bair
richard.bair at oracle.com
Fri May 31 17:41:56 PDT 2013
This is the issue: https://javafx-jira.kenai.com/browse/RT-6475
Lets carry on the conversation there about the API. Basically what we need is a simple API on Text (which we can then also add to Labeled) that allows you to pick the rendering mode. Right now we're picking it for you (and happen to pick the one that gives really great smoothness but only in the case that the text is large, otherwise we resort back to glyphs), but you need to have some kind of control in these cases. I thought that cache & cacheHint would do the trick, but it appears to not be working (and even if it did it means rendering the entire text into a texture which may or may not be good depending on the use case).
Richard
On May 31, 2013, at 5:35 PM, Daniel Zwolenski <zonski at gmail.com> wrote:
> Yes, this one is beautiful on my system. Nice!
>
> I tried scaling down to 0 instead of 1, there is a slight jitter and pixelation at the tiny ranges.
>
> I also tried swapping in a Label instead Text just to see. It is also very pretty at the larger sizes and possibly the pixelation and jitter is slightly more pronounced (hard to say as it's not by much).
>
> Generally though, hitting a very high level of niceness.
>
>
>
>
> On Sat, Jun 1, 2013 at 10:02 AM, Richard Bair <richard.bair at oracle.com> wrote:
> >> 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