Enum Class DrawSpace

java.lang.Object
java.lang.Enum<DrawSpace>
com.botwithus.bot.api.draw.DrawSpace
All Implemented Interfaces:
Serializable, Comparable<DrawSpace>, Constable

public enum DrawSpace extends Enum<DrawSpace>
The coordinate space a draw command's geometry is expressed in.

SCREEN is client-area pixels with the origin at the top left. WORLD is game-world coordinates, which the producer projects to the screen on its own thread — so a world command follows the thing it marks as the camera moves, instead of being pinned where the camera happened to be when it was sent.

Both work. Through phases 1 and 2 world space was accepted, validated and then refused with "world space requires projection - not yet implemented"; the field shipped on the wire from the start precisely so this API's shape would not have to change when projection landed, and it did not.

Not every primitive projects. A DrawKind.POLY is refused in world space — its points live in a side slot with no room for a projected copy — and a DrawKind.COMPONENT is already on screen, so it has no world position at all.

  • Enum Constant Details

  • Method Details

    • values

      public static DrawSpace[] 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 DrawSpace 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
    • wireName

      public String wireName()
      The lower-case token this space is spelled as in the space field.
    • fromWireName

      public static DrawSpace fromWireName(String name)
      The space a producer reply spelled, defaulting to SCREEN.