Class GradientShader.Interpolation

java.lang.Object
icyllis.arc3d.core.shaders.GradientShader.Interpolation
Enclosing class:
GradientShader

public static class GradientShader.Interpolation extends Object
Color interpolation method, is packed into an int.
  • Field Details

    • kDestination_ColorSpace

      public static final byte kDestination_ColorSpace
      Interpolation color space.
      See Also:
    • kSRGB_ColorSpace

      public static final byte kSRGB_ColorSpace
      Interpolation color space.
      See Also:
    • kSRGBLinear_ColorSpace

      public static final byte kSRGBLinear_ColorSpace
      Interpolation color space.
      See Also:
    • kLab_ColorSpace

      public static final byte kLab_ColorSpace
      Interpolation color space.
      See Also:
    • kOKLab_ColorSpace

      public static final byte kOKLab_ColorSpace
      Interpolation color space.
      See Also:
    • kOKLabGamutMap_ColorSpace

      public static final byte kOKLabGamutMap_ColorSpace
      Interpolation color space.
      See Also:
    • kHSL_ColorSpace

      public static final byte kHSL_ColorSpace
      Interpolation color space.
      See Also:
    • kHWB_ColorSpace

      public static final byte kHWB_ColorSpace
      Interpolation color space.
      See Also:
    • kLCH_ColorSpace

      public static final byte kLCH_ColorSpace
      Interpolation color space.
      See Also:
    • kOKLCH_ColorSpace

      public static final byte kOKLCH_ColorSpace
      Interpolation color space.
      See Also:
    • kOKLCHGamutMap_ColorSpace

      public static final byte kOKLCHGamutMap_ColorSpace
      Interpolation color space.
      See Also:
    • kLast_ColorSpace

      public static final byte kLast_ColorSpace
      See Also:
    • kColorSpaceCount

      public static final int kColorSpaceCount
      See Also:
    • kShorter_HueMethod

      public static final byte kShorter_HueMethod
      Hue interpolation method.
      See Also:
    • kLonger_HueMethod

      public static final byte kLonger_HueMethod
      Hue interpolation method.
      See Also:
    • kIncreasing_HueMethod

      public static final byte kIncreasing_HueMethod
      Hue interpolation method.
      See Also:
    • kDecreasing_HueMethod

      public static final byte kDecreasing_HueMethod
      Hue interpolation method.
      See Also:
    • kLast_HueMethod

      public static final byte kLast_HueMethod
      See Also:
    • kHueMethodCount

      public static final int kHueMethodCount
      See Also:
  • Constructor Details

    • Interpolation

      public Interpolation()
  • Method Details

    • make

      public static int make(boolean inPremul, byte colorSpace, byte hueMethod)
      Make a packed color interpolation method.

      By default, gradients will interpolate their colors in unpremul space and then premultiply each of the results. By setting inPremul to true, the gradients will premultiply their colors first, and then interpolate between them.

      Parameters:
      inPremul - whether interpolate colors in premul space
      colorSpace - the interpolation color space
      hueMethod - the hue interpolation method, for LCH, OKLCH, HSL, or HWB
      Returns:
      a packed color interpolation method
    • isInPremul

      public static boolean isInPremul(int interpolation)
    • getColorSpace

      public static byte getColorSpace(int interpolation)
    • getHueMethod

      public static byte getHueMethod(int interpolation)