Class StyledText.Plain

java.lang.Object
tripleplay.util.StyledText
tripleplay.util.StyledText.Plain
Direct Known Subclasses:
StyledText.Block, StyledText.Span
Enclosing class:
StyledText

public abstract static class StyledText.Plain extends StyledText
A shared base class for single- and multi-line plain text.
  • Field Details

    • text

      public final String text
      The text being rendered.
    • style

      public final TextStyle style
      The stylings applied to this text.
  • Method Details

    • resize

      public abstract StyledText.Plain resize(float size)
      Creates a new instance equivalent to this one excepting that the font size is adjusted to size. This is useful for auto-shrinking text to fit into fixed space.
    • toLayer

      public ImageLayer toLayer(ImageLayer target)
      Description copied from class: StyledText
      Creates an image large enough to accommodate this styled text, renders it therein and applies it to layer, adjusting its translation per the effect renderer.
      Specified by:
      toLayer in class StyledText
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object