Class SimpleTextLayout.TextBoundingBox
- java.lang.Object
-
- com.metsci.glimpse.core.support.font.SimpleTextLayout.TextBoundingBox
-
- Enclosing class:
- SimpleTextLayout
public static class SimpleTextLayout.TextBoundingBox extends Object
When drawing using the JOGLTextRenderer, theleftXandbaselineYshould be used as the text origin.- Author:
- borkholder
-
-
Field Summary
Fields Modifier and Type Field Description floatbaselineYThe y coordinate for the baseline, this is in the same coordinate-system as the provided parameters inSimpleTextLayout.doLayout(String, float, float, float).floatleftXThe left-most x coordinate for the text.floatmaxDescentThe maximum descent of any character in this string.floatmaxHeightThe difference between the maximum ascent of any character and the lowest descent of any character.StringtextThe text to display on this line.floatwidthThe total width of the string.
-
Constructor Summary
Constructors Constructor Description TextBoundingBox(String text, float baselineY, float leftX, float descent, float width, float height)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description floatgetMaxX()Gets the maximum X coordinate of the text bounding box.floatgetMaxY()Gets the maximum y coordinate of the text bounding box.floatgetMinX()Gets the minimum X coordinate of the text bounding box.floatgetMinY()Gets the minimum Y coordinate of the text bounding box.
-
-
-
Field Detail
-
text
public final String text
The text to display on this line.
-
baselineY
public final float baselineY
The y coordinate for the baseline, this is in the same coordinate-system as the provided parameters inSimpleTextLayout.doLayout(String, float, float, float).
-
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.
-
-