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

Draw JInternalFrame borders by rectangles for floating point UI scale

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • P4
    • tbd
    • 9
    • client-libs

    Description

      Drawing rectangles using clip and lines can lead that some borders are not drawn for floating point UI scale. See the attached screenshot:
      ----------------
              g.scale(1.5, 1.5);
              g.setColor(Color.ORANGE);
              drawRect(g, 7, 5, 25, 20);
              drawRect(g, 35, 5, 24, 21);

          private static void drawRect(Graphics2D g, int x, int y, int w, int h) {

              g.setClip(x, y, w, h);
              g.drawLine(x, y, x + w, y);
              g.drawLine(x, y + h, x + w, y + h);
              g.drawLine(x, y, x, y + h);
              g.drawLine(x + w, y, x + w, y + h);

          }
      ----------------

      The JInternalFrame borders should be drawn by rectangles.


      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              alexsch Alexandr Scherbatiy
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: