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

[hidpi] Window.setShape() works incorrectly on HiDPI

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 9
    • 9, 17
    • client-libs
    • b130

      Please run the attached test - the following image should appear: red square (100x100) in the center of another one (300x300).

      Then please uncomment line
        System.setProperty("sun.java2d.uiScale", "2");
      Expectation - scale x2 for both the rectangles. But the inner one is not scaled properly (it seems to be non-scaled at all) - see the screenshot attached (the same for the ellipse shape etc.)

      JDK9b121 + Win. 7

      Also reproducible on HiDPI screen without applying debug scale flag (Win. 10 + the same JDK9 build).

      Causes multiple failures of "ShapedAndTranslucentWindows" tests for awt, swing

        1. NOK.png
          NOK.png
          3 kB
        2. Test.java
          1 kB

            rchamyal Rajeev Chamyal (Inactive)
            avstepan Alexander Stepanov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: