Enum Class GradientShader.HueInterpolationMethod

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

public static enum GradientShader.HueInterpolationMethod extends Enum<GradientShader.HueInterpolationMethod>
Hue interpolation method. See CSS Hue Interpolation
  • Enum Constant Details

    • SHORTER

      public static final GradientShader.HueInterpolationMethod SHORTER
      Hue angles are interpolated to take the shorter of the two arcs between the starting and ending hues.
    • LONGER

      public static final GradientShader.HueInterpolationMethod LONGER
      Hue angles are interpolated to take the longer of the two arcs between the starting and ending hues.
    • INCREASING

      public static final GradientShader.HueInterpolationMethod INCREASING
      Hue angles are interpolated so that, as they progress from the first color to the second, the angle is always increasing. If the angle increases to 360 it is reset to zero, and then continues increasing.

      Depending on the difference between the two angles, this will either look the same as shorter or as longer. However, if one of the hue angles is being animated, and the hue angle difference passes through 180 degrees, the interpolation will not flip to the other arc.

    • DECREASING

      public static final GradientShader.HueInterpolationMethod DECREASING
      Hue angles are interpolated so that, as they progress from the first color to the second, the angle is always decreasing. If the angle decreases to 0 it is reset to 360, and then continues decreasing.

      Depending on the difference between the two angles, this will either look the same as shorter or as longer. However, if one of the hue angles is being animated, and the hue angle difference passes through 180 degrees, the interpolation will not flip to the other arc.

  • Method Details

    • values

      public static GradientShader.HueInterpolationMethod[] 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 GradientShader.HueInterpolationMethod 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