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

Draw JInternalFrame borders by rectangles for floating point UI scale

    Details

    • Type: Bug
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 9
    • Fix Version/s: tbd
    • Component/s: client-libs
    • Labels:

      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

              • Assignee:
                Unassigned
                Reporter:
                alexsch Alexander Scherbatiy (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated: