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

TextLayout.getCaretInfo(TextHit(0))[0] returning Advance

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • 1.2.0
    • 1.2.0
    • client-libs
    • 2d
    • 1.2beta4
    • sparc
    • solaris_2.6
    • Verified

      I would expect TextLayout.getCarentInfo(TextHit(0,true)[0] to return the first xAdvance instead it is returning the Advance.

      TextLayout layout = new TextLayout("Test", getFont());
      TextHitInfo thi = new TextHitInfo(0, true);
      float[] caretInfo = layout.getCaretInfo(thi);
      System.out.println("position: " + caretInfo[0]);

            jkaulorcl Jeet Kaul (Inactive)
            blichtensunw Brian Lichtenwalter (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: