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

[Mac, Retina] SubScene contents are blurry

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 8u20
    • Fix Version/s: 8u40
    • Component/s: javafx
    • Labels:
      None
    • Environment:

      2014 Macbook Pro (retina display), OS X 10.9.5, java.runtime.version=1.8.0_20-b26

      Description

      Elements that placed inside a SubScene are blurry.

      Link to a preview of the sample application on my system:
        http://i.imgur.com/q5pudHP.png

      Sample application:

      import javafx.application.Application;
      import javafx.scene.*;
      import javafx.scene.layout.HBox;
      import javafx.scene.text.Text;
      import javafx.stage.Stage;

      public class BlurrySubscene extends Application {
          public static void main(String[] args) {
              launch(args);
          }
       
          @Override
          public void start(Stage stage) {
              final Text subsceneText = new Text("Subscene Text:\n\n" + TEXT);
              subsceneText.relocate(0, 0);
              double W = subsceneText.getBoundsInLocal().getWidth();
              double H = subsceneText.getBoundsInLocal().getHeight();

              SubScene subscene = new SubScene(new Group(subsceneText), W, H);
              Scene scene = new Scene(
                  new HBox(
                      subscene,
                      new Text("Scene Text:\n\n" + TEXT)
                  )
              );
              stage.setScene(scene);

              stage.show();
          }

          private static final String TEXT =
                  "O for a Muse of fire, that would ascend\n" +
                  "The brightest heaven of invention,\n" +
                  "A kingdom for a stage, princes to act\n" +
                  "And monarchs to behold the swelling scene!\n" +
                  "Then should the warlike Harry, like himself,\n" +
                  "Assume the port of Mars; and at his heels,\n" +
                  "Leash'd in like hounds, should famine, sword and fire\n" +
                  "Crouch for employment";
      }

        Attachments

        1. BlurrySubscene2.java
          4 kB
        2. BlurrySubscene3.java
          2 kB
        3. SubScene.png
          SubScene.png
          179 kB
        4. SubsceneTextWithFix.PNG
          SubsceneTextWithFix.PNG
          29 kB
        5. SubsceneTextWithOutFix.PNG
          SubsceneTextWithOutFix.PNG
          13 kB

          Issue Links

            Activity

              People

              Assignee:
              flar Jim Graham
              Reporter:
              josmithjfx John Smith (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported: