Package tripleplay.util
Class StyledText.Span
java.lang.Object
tripleplay.util.StyledText
tripleplay.util.StyledText.Plain
tripleplay.util.StyledText.Span
- Enclosing class:
StyledText
A single line of plain (uniformly styled) text.
-
Nested Class Summary
Nested classes/interfaces inherited from class tripleplay.util.StyledText
StyledText.Block, StyledText.Plain, StyledText.Span
-
Field Summary
Fields inherited from class tripleplay.util.StyledText.Plain
style, text
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
float
height()
The height of this styled text when rendered.void
Renders this styled text into the supplied canvas at the specified offset.resize
(float size) Creates a new instance equivalent to this one excepting that the font size is adjusted tosize
.toString()
float
width()
The width of this styled text when rendered.Methods inherited from class tripleplay.util.StyledText.Plain
hashCode, toLayer
Methods inherited from class tripleplay.util.StyledText
block, span, toCanvas, toLayer
-
Constructor Details
-
Span
-
-
Method Details
-
width
public float width()Description copied from class:StyledText
The width of this styled text when rendered.- Specified by:
width
in classStyledText
-
height
public float height()Description copied from class:StyledText
The height of this styled text when rendered.- Specified by:
height
in classStyledText
-
render
Description copied from class:StyledText
Renders this styled text into the supplied canvas at the specified offset.- Specified by:
render
in classStyledText
-
resize
Description copied from class:StyledText.Plain
Creates a new instance equivalent to this one excepting that the font size is adjusted tosize
. This is useful for auto-shrinking text to fit into fixed space.- Specified by:
resize
in classStyledText.Plain
-
equals
- Overrides:
equals
in classStyledText.Plain
-
toString
-