Enum Class Paint.Style

java.lang.Object
java.lang.Enum<Paint.Style>
icyllis.modernui.graphics.Paint.Style
All Implemented Interfaces:
Serializable, Comparable<Paint.Style>, Constable
Enclosing class:
Paint

public static enum Paint.Style extends Enum<Paint.Style>
Set Style to fill, stroke, or both fill and stroke geometry.

The stroke and fill share all paint attributes; for instance, they are drawn with the same color. Use Paint.STROKE_AND_FILL to avoid hitting the same pixels twice with a stroke draw and a fill draw. The default is FILL.

  • Enum Constant Details

    • FILL

      public static final Paint.Style FILL
      Geometry and text drawn with this style will be filled, ignoring all stroke-related settings in the paint.
    • STROKE

      public static final Paint.Style STROKE
      Geometry and text drawn with this style will be stroked, respecting the stroke-related fields on the paint.
    • FILL_AND_STROKE

      public static final Paint.Style FILL_AND_STROKE
      Geometry and text drawn with this style will be both filled and stroked at the same time, respecting the stroke-related fields on the paint. This mode can give unexpected results if the geometry is oriented counter-clockwise. This restriction does not apply to either FILL or STROKE.
  • Method Details

    • values

      public static Paint.Style[] 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 Paint.Style 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