Package icyllis.arc3d.core.shaders

# 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 Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final int`
  `kColorSpaceCount`
  `static final byte`
  `kDecreasing_HueMethod`
  Hue interpolation method.
  `static final byte`
  `kDestination_ColorSpace`
  Interpolation color space.
  `static final byte`
  `kHSL_ColorSpace`
  Interpolation color space.
  `static final int`
  `kHueMethodCount`
  `static final byte`
  `kHWB_ColorSpace`
  Interpolation color space.
  `static final byte`
  `kIncreasing_HueMethod`
  Hue interpolation method.
  `static final byte`
  `kLab_ColorSpace`
  Interpolation color space.
  `static final byte`
  `kLast_ColorSpace`
  `static final byte`
  `kLast_HueMethod`
  `static final byte`
  `kLCH_ColorSpace`
  Interpolation color space.
  `static final byte`
  `kLonger_HueMethod`
  Hue interpolation method.
  `static final byte`
  `kOKLab_ColorSpace`
  Interpolation color space.
  `static final byte`
  `kOKLabGamutMap_ColorSpace`
  Interpolation color space.
  `static final byte`
  `kOKLCH_ColorSpace`
  Interpolation color space.
  `static final byte`
  `kOKLCHGamutMap_ColorSpace`
  Interpolation color space.
  `static final byte`
  `kShorter_HueMethod`
  Hue interpolation method.
  `static final byte`
  `kSRGB_ColorSpace`
  Interpolation color space.
  `static final byte`
  `kSRGBLinear_ColorSpace`
  Interpolation color space.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Interpolation()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static byte`
  `getColorSpace(int interpolation)`
  `static byte`
  `getHueMethod(int interpolation)`
  `static boolean`
  `isInPremul(int interpolation)`
  `static int`
  `make(boolean inPremul, byte colorSpace, byte hueMethod)`
  Make a packed color interpolation method.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### kDestination_ColorSpace

    public static final byte kDestination_ColorSpace
    Interpolation color space.
    See Also:
      - Constant Field Values

  - ### kSRGB_ColorSpace

    public static final byte kSRGB_ColorSpace
    Interpolation color space.
    See Also:
      - Constant Field Values

  - ### kSRGBLinear_ColorSpace

    public static final byte kSRGBLinear_ColorSpace
    Interpolation color space.
    See Also:
      - Constant Field Values

  - ### kLab_ColorSpace

    public static final byte kLab_ColorSpace
    Interpolation color space.
    See Also:
      - Constant Field Values

  - ### kOKLab_ColorSpace

    public static final byte kOKLab_ColorSpace
    Interpolation color space.
    See Also:
      - Constant Field Values

  - ### kOKLabGamutMap_ColorSpace

    public static final byte kOKLabGamutMap_ColorSpace
    Interpolation color space.
    See Also:
      - Constant Field Values

  - ### kHSL_ColorSpace

    public static final byte kHSL_ColorSpace
    Interpolation color space.
    See Also:
      - Constant Field Values

  - ### kHWB_ColorSpace

    public static final byte kHWB_ColorSpace
    Interpolation color space.
    See Also:
      - Constant Field Values

  - ### kLCH_ColorSpace

    public static final byte kLCH_ColorSpace
    Interpolation color space.
    See Also:
      - Constant Field Values

  - ### kOKLCH_ColorSpace

    public static final byte kOKLCH_ColorSpace
    Interpolation color space.
    See Also:
      - Constant Field Values

  - ### kOKLCHGamutMap_ColorSpace

    public static final byte kOKLCHGamutMap_ColorSpace
    Interpolation color space.
    See Also:
      - Constant Field Values

  - ### kLast_ColorSpace

    public static final byte kLast_ColorSpace
    See Also:
      - Constant Field Values

  - ### kColorSpaceCount

    public static final int kColorSpaceCount
    See Also:
      - Constant Field Values

  - ### kShorter_HueMethod

    public static final byte kShorter_HueMethod
    Hue interpolation method.
    See Also:
      - Constant Field Values

  - ### kLonger_HueMethod

    public static final byte kLonger_HueMethod
    Hue interpolation method.
    See Also:
      - Constant Field Values

  - ### kIncreasing_HueMethod

    public static final byte kIncreasing_HueMethod
    Hue interpolation method.
    See Also:
      - Constant Field Values

  - ### kDecreasing_HueMethod

    public static final byte kDecreasing_HueMethod
    Hue interpolation method.
    See Also:
      - Constant Field Values

  - ### kLast_HueMethod

    public static final byte kLast_HueMethod
    See Also:
      - Constant Field Values

  - ### kHueMethodCount

    public static final int kHueMethodCount
    See Also:
      - Constant Field Values

- ## 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)