public final class Text extends Primitive
Modifier and Type | Field and Description |
---|---|
static int |
ALIGN_CENTER
Center Alignment
|
static int |
ALIGN_LEFT
Left Alignment
|
static int |
ALIGN_RIGHT
Right Alignment
|
static float |
BASE_VIEWPORT_SIZE
Viewport size (in pixels) on which the base font size is relative to
|
ABSOLUTE_POSITION, ABSOLUTE_ROTATION, ABSOLUTE_SIZE, PRIMITIVE_TYPE_ELLIPSE, PRIMITIVE_TYPE_RECTANGLE, PRIMITIVE_TYPE_REGULARPOLYGON, PRIMITIVE_TYPE_TEXT, PRIMITIVE_TYPE_TEXTUREDRECTANGLE, PRIMITIVE_TYPE_TRIANGLE
Constructor and Description |
---|
Text()
The condition deciding if the drawable should be drawn.
|
Text(Object position,
Font baseFont,
Color color,
String text,
int align,
int absFlags,
IParsedExpression drawcondition) |
Modifier and Type | Method and Description |
---|---|
double |
getAlignment(TextLayout tl) |
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 String |
getReplacedText(DrawableCombiner dc,
Object obj,
String text,
IViewport vp) |
String |
getText() |
enableAbsolutePosition, enableAbsoluteRotation, enableAbsoluteSize, flushRenderInfo, getColor, getDrawCondition, getRenderInfo, getType, isRelativePosition, isRelativeRotation, isRelativeSize, setColor, setDrawCondition, setRenderInfo, setType
bindPosition, bindRotation, bindSize, getPosition, getRotation, getSize, setPosition, setRotation, setSize
public static final int ALIGN_LEFT
public static final int ALIGN_CENTER
public static final int ALIGN_RIGHT
public static final float BASE_VIEWPORT_SIZE
public Text()
public Text(Object position, Font baseFont, Color color, String text, int align, int absFlags, IParsedExpression drawcondition)
public Font getBaseFont()
public String getText()
public double getAlignment(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 String getReplacedText(DrawableCombiner dc, Object obj, String text, IViewport vp)
Copyright © 2013. All Rights Reserved.