public final class Text extends Primitive
Modifier and Type | Field and Description |
---|---|
static float |
BASE_VIEWPORT_SIZE
Viewport size (in pixels) on which the base font size is relative to
|
ABSOLUTE_POSITION, ABSOLUTE_ROTATION, ABSOLUTE_SIZE, ALIGN_BOTTOM, ALIGN_CENTER, ALIGN_LEFT, ALIGN_MIDDLE, ALIGN_RIGHT, ALIGN_TOP, color_, drawcondition, enableDCPos, enableDCRot, enableDCSize, halign, PRIMITIVE_TYPE_ELLIPSE, PRIMITIVE_TYPE_RECTANGLE, PRIMITIVE_TYPE_REGULARPOLYGON, PRIMITIVE_TYPE_TEXT, PRIMITIVE_TYPE_TEXTUREDRECTANGLE, PRIMITIVE_TYPE_TRIANGLE, renderinfos, type, valign
Constructor and Description |
---|
Text()
The condition deciding if the drawable should be drawn.
|
Text(java.lang.Object position,
java.awt.Font baseFont,
java.awt.Color color,
java.lang.String text,
int halign,
int valign,
int absFlags,
IParsedExpression drawcondition) |
Modifier and Type | Method and Description |
---|---|
java.awt.Font |
getBaseFont() |
static IVector2 |
getBasePosition(AbstractViewport vp,
IVector2 dcPos,
IVector2 position,
IVector2 canvasSize,
boolean invX,
boolean invY) |
static float |
getBasicFontScale(IVector2 canvasSize,
IVector2 areaSize,
IVector2 size) |
static java.lang.String |
getReplacedText(DrawableCombiner dc,
java.lang.Object obj,
java.lang.String text,
IViewport vp) |
java.lang.String |
getText() |
double |
getTextHAlignment(java.awt.font.TextLayout tl) |
enableAbsolutePosition, enableAbsoluteRotation, enableAbsoluteSize, flushRenderInfo, getColor, getDrawCondition, getHAlign, getRenderInfo, getType, getVAlign, isRelativePosition, isRelativeRotation, isRelativeSize, setColor, setDrawCondition, setHAlign, setRenderInfo, setType, setVAlign
bindPosition, bindRotation, bindSize, getPosition, getRotation, getSize, setPosition, setRotation, setSize
public static final float BASE_VIEWPORT_SIZE
public Text()
public Text(java.lang.Object position, java.awt.Font baseFont, java.awt.Color color, java.lang.String text, int halign, int valign, int absFlags, IParsedExpression drawcondition)
public java.awt.Font getBaseFont()
public java.lang.String getText()
public double getTextHAlignment(java.awt.font.TextLayout tl)
public static final IVector2 getBasePosition(AbstractViewport vp, IVector2 dcPos, IVector2 position, IVector2 canvasSize, boolean invX, boolean invY)
public static final float getBasicFontScale(IVector2 canvasSize, IVector2 areaSize, IVector2 size)
public static final java.lang.String getReplacedText(DrawableCombiner dc, java.lang.Object obj, java.lang.String text, IViewport vp)