Enum Class ShapeType

java.lang.Object
java.lang.Enum<ShapeType>
com.catsoftware.engine.prism.shapes.ShapeType
All Implemented Interfaces:
Serializable, Comparable<ShapeType>, Constable

public enum ShapeType extends Enum<ShapeType>
Enumeration of all available shape types in Prism. Used by ShapeObject to determine which shape to draw.
Since:
Prism B1
  • Enum Constant Details

    • SQUARE

      public static final ShapeType SQUARE
      A four-sided polygon with equal angles
    • TRIANGLE

      public static final ShapeType TRIANGLE
      A three-sided polygon
    • CIRCLE

      public static final ShapeType CIRCLE
      A round shape defined by a center point and radius
    • HEART

      public static final ShapeType HEART
      A heart-shaped curve (parametric equation)
    • LINE

      public static final ShapeType LINE
      A straight line between two points
    • STAR

      public static final ShapeType STAR
      A multi-pointed star shape
    • ARROW

      public static final ShapeType ARROW
      An arrow shape pointing in a direction
    • PENTAGON

      public static final ShapeType PENTAGON
      A five-sided polygon
    • HEXAGON

      public static final ShapeType HEXAGON
      A six-sided polygon
    • OCTAGON

      public static final ShapeType OCTAGON
      An eight-sided polygon
    • CROSS

      public static final ShapeType CROSS
      A plus/cross shape
    • DIAMOND

      public static final ShapeType DIAMOND
      A diamond/rhombus shape
  • Method Details

    • values

      public static ShapeType[] 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 ShapeType 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