public class TiledText extends Object
A TiledText represents the text of a text-type Tiled object. It corresponds to a <text> tag in a Tiled XML file.
Modifier and Type | Class and Description |
---|---|
static class |
TiledText.HAlign
Represents a horizontal alignment that text can have within a text
object.
|
static class |
TiledText.VAlign
Represents a vertical alignment that text can have within a text
object.
|
Modifier and Type | Method and Description |
---|---|
boolean |
getBold()
Returns whether this text's font is bold (false by default).
|
Color |
getColor()
Returns this text's color (black by default).
|
String |
getContent()
Returns the content of this text; that is, the actual text.
|
String |
getFontFamily()
Returns this text's font family ("sans-serif" by default).
|
TiledText.HAlign |
getHAlign()
Returns this text's horizontal alignment within its text object
(
TiledText.HAlign.LEFT ) by default. |
boolean |
getItalic()
Returns whether this text's font is italic (false by default).
|
boolean |
getKerning()
Returns whether kerning should be used while rendering this text (true by
default).
|
int |
getPixelSize()
Returns this text's font size in pixels (16 by default).
|
boolean |
getStrikeout()
Returns whether a line should be drawn through this text (false by
default).
|
boolean |
getUnderline()
Returns whether a line should be drawn below this text (false by
default).
|
TiledText.VAlign |
getVAlign()
Returns this text's vertical alignment within its text object
(
TiledText.VAlign.TOP ) by default. |
boolean |
getWrap()
Returns whether word wrapping is enabled for this text (false by
default).
|
public final String getContent()
public final String getFontFamily()
public final int getPixelSize()
public final boolean getWrap()
public final Color getColor()
public final boolean getBold()
public final boolean getItalic()
public final boolean getUnderline()
public final boolean getStrikeout()
public final boolean getKerning()
public final TiledText.HAlign getHAlign()
TiledText.HAlign.LEFT
) by default.public final TiledText.VAlign getVAlign()
TiledText.VAlign.TOP
) by default.Copyright © 2020. All rights reserved.