Package tripleplay.util
Class StyledText.Plain
java.lang.Object
tripleplay.util.StyledText
tripleplay.util.StyledText.Plain
- Direct Known Subclasses:
StyledText.Block
,StyledText.Span
- Enclosing class:
StyledText
A shared base class for single- and multi-line plain text.
-
Nested Class Summary
Nested classes/interfaces inherited from class tripleplay.util.StyledText
StyledText.Block, StyledText.Plain, StyledText.Span
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
int
hashCode()
abstract StyledText.Plain
resize
(float size) Creates a new instance equivalent to this one excepting that the font size is adjusted tosize
.toLayer
(ImageLayer target) Creates an image large enough to accommodate this styled text, renders it therein and applies it tolayer
, adjusting its translation per the effect renderer.
-
Field Details
-
text
The text being rendered. -
style
The stylings applied to this text.
-
-
Method Details
-
resize
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. -
toLayer
Description copied from class:StyledText
Creates an image large enough to accommodate this styled text, renders it therein and applies it tolayer
, adjusting its translation per the effect renderer.- Specified by:
toLayer
in classStyledText
-
hashCode
public int hashCode() -
equals
-