Enum Class LazyFont.TextAnchor

All Implemented Interfaces:
Serializable, Comparable<LazyFont.TextAnchor>, Constable
Enclosing class:
LazyFont

public static enum LazyFont.TextAnchor extends Enum<LazyFont.TextAnchor>
Represents the origin of drawing for LazyFont.DrawableStrings. For example, calling LazyFont.DrawableString.setAnchor(TextAnchor) with TOP_RIGHT would mean all calls to LazyFont.DrawableString.draw(float, float) will consider the top right of the LazyFont.DrawableString to be the origin when drawing, meaning all text would appear to the left and below the point passed into LazyFont.DrawableString.draw(float, float).
Since:
2.7
  • Enum Constant Details

    • TOP_LEFT

      public static final LazyFont.TextAnchor TOP_LEFT
      Text will be drawn below and to the right of the origin.
    • TOP_CENTER

      public static final LazyFont.TextAnchor TOP_CENTER
      Text will be drawn centered below the origin.
    • TOP_RIGHT

      public static final LazyFont.TextAnchor TOP_RIGHT
      Text will be drawn below and to the left of the origin.
    • CENTER_LEFT

      public static final LazyFont.TextAnchor CENTER_LEFT
      Text will be drawn centered to the right of the origin.
    • CENTER

      public static final LazyFont.TextAnchor CENTER
      Text will be drawn centered around the origin.
    • CENTER_RIGHT

      public static final LazyFont.TextAnchor CENTER_RIGHT
      Text will be drawn centered to the left of the origin.
    • BOTTOM_LEFT

      public static final LazyFont.TextAnchor BOTTOM_LEFT
      Text will be drawn above and to the right of the origin.
    • BOTTOM_CENTER

      public static final LazyFont.TextAnchor BOTTOM_CENTER
      Text will be drawn centered above the origin.
    • BOTTOM_RIGHT

      public static final LazyFont.TextAnchor BOTTOM_RIGHT
      Text will be drawn below and to the left of the origin.
  • Method Details

    • values

      public static LazyFont.TextAnchor[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static LazyFont.TextAnchor valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null