Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8116905

Nodes that is cached with cacheHint SPEED doesn't draw

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 8
    • 8
    • javafx
    • None

      I expected this to work, but it doesn't draw anything:

              final StackPane rootPane = new StackPane();

              Text text = new Text("This is a text node");
              text.setCache(true);
              text.setCacheHint(CacheHint.SPEED);
              ScaleTransition scale = new ScaleTransition(Duration.seconds(5), text);
              scale.setCycleCount(Animation.INDEFINITE);
              scale.setAutoReverse(true);
              scale.setFromX(0);
              scale.setFromY(0);
              scale.setToX(5);
              scale.setToY(5);
              scale.play();
              rootPane.getChildren().add(text);

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


      It *should* have rendered the text node at its normal size, and then used this cached version for the subsequent animation. Instead it draws nothing.

            fheidric Felipe Heidrich (Inactive)
            rbair Richard Bair (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: