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

FontMetrics problem getting values from g2.getFontMetrics()

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P2
    • None
    • 1.2.0
    • client-libs
    • 2d
    • sparc
    • solaris_2.6

    Description

      Run the Java2D demo located in /usr/local/java/jdk1.2/solaris/demo/jfc/Java2D. Take a look at the Memory Monitor and Performance Monitor canvases.

      PerformanceMonitor strings are not positioned appropriately. And the MemoryMonitor memory graph isn't positioned correctly. Here's how the ascent's & descent's are determined :

      MemoryMonitor :
         ascent = (int) offG.getFontMetrics(font).getAscent();
         descent = (int) offG.getFontMetrics(font).getDescent();

      PerfomanceMonitor :
          ssH += (int) offG.getFontMetrics().getAscent()
                         + offG.getFontMetrics().getDescent();


      "JDK-1.2beta4-F"

      Attachments

        Issue Links

          Activity

            People

              pcharltosunw Paul Charlton (Inactive)
              blichtensunw Brian Lichtenwalter (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: