Class SimpleTextLayout.TextBoundingBox

  • Enclosing class:
    SimpleTextLayout

    public static class SimpleTextLayout.TextBoundingBox
    extends Object
    When drawing using the JOGL TextRenderer, the leftX and baselineY should be used as the text origin.
    Author:
    borkholder
    • Field Detail

      • text

        public final String text
        The text to display on this line.
      • leftX

        public final float leftX
        The left-most x coordinate for the text.
      • maxDescent

        public final float maxDescent
        The maximum descent of any character in this string. If no characters in the line have descenders, this will 0 or negative (indicating all characters are above the baseline).
      • width

        public final float width
        The total width of the string.
      • maxHeight

        public final float maxHeight
        The difference between the maximum ascent of any character and the lowest descent of any character.
    • Constructor Detail

      • TextBoundingBox

        public TextBoundingBox​(String text,
                               float baselineY,
                               float leftX,
                               float descent,
                               float width,
                               float height)
    • Method Detail

      • getMaxY

        public float getMaxY()
        Gets the maximum y coordinate of the text bounding box.
      • getMinY

        public float getMinY()
        Gets the minimum Y coordinate of the text bounding box.
      • getMinX

        public float getMinX()
        Gets the minimum X coordinate of the text bounding box.
      • getMaxX

        public float getMaxX()
        Gets the maximum X coordinate of the text bounding box.