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

Region incorrectly sizes background image with cover causing loss of aspect ratio

XMLWordPrintable

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

      A bug in NGRegion makes it so that the following code has the wrong resize behavior. The image is being stretched, but should always maintain the correct aspect ratio.


              Region r = new Region();
              r.setStyle("-fx-background-image: url(\"https://www.devoxx.com/plugins/servlet/builder/resource/DEVOXX2012/bg.jpg?1339672736848\");" +
                         "-fx-background-size: cover;");


      The bug is due to the code that computes how to draw in NGRegion.

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

              Created:
              Updated:
              Resolved:
              Imported: