Class WTextItem


public class WTextItem extends Object
The result of a font metrics computation.

See Also:
  • Constructor Details

  • Method Details

    • getText

      public WString getText()
      Returns the measured text.

      If the item was measured with word breaking enabled, then the text may contain trailing whitespace that is not included in the getWidth().

    • getWidth

      public double getWidth()
      Returns the measured width.

      Returns the text width, in device local coordinates (pixels).

    • getNextWidth

      public double getNextWidth()
      Returns the width for a next line-break boundary.

      Returns the width until the next line-break boundary, or -1 if the underlying word boundary analysis does not support this.