Interface TextExtents


public interface TextExtents
Represent the size required to display some text.
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    Returns the distance to advance in the X direction after drawing these glyphs.
    double
    Returns the distance to advance in the Y direction after drawing these glyphs.
    double
    Returns the horizontal distance from the origin to the leftmost part of the glyphs as drawn.
    double
    Returns the vertical distance from the origin to the topmost part of the glyphs as drawn.
    double
    Returns the height of the glyphs as drawn.
    double
    Returns the width of the glyphs as drawn.
  • Method Details

    • getBearingX

      double getBearingX()
      Returns the horizontal distance from the origin to the leftmost part of the glyphs as drawn. Positive if the glyphs lie entirely to the right of the origin.
    • getBearingY

      double getBearingY()
      Returns the vertical distance from the origin to the topmost part of the glyphs as drawn. Positive only if the glyphs lie completely below the origin; will usually be negative.
    • getWidth

      double getWidth()
      Returns the width of the glyphs as drawn.
    • getHeight

      double getHeight()
      Returns the height of the glyphs as drawn.
    • getAdvanceX

      double getAdvanceX()
      Returns the distance to advance in the X direction after drawing these glyphs.
    • getAdvanceY

      double getAdvanceY()
      Returns the distance to advance in the Y direction after drawing these glyphs. Will typically be zero except for vertical text layout as found in East-Asian languages.