Package icyllis.arc3d.core.shaders

# Class Color4fShader

java.lang.Object
icyllis.arc3d.core.shaders.Color4fShader

All Implemented Interfaces:
  `RefCounted`, `Shader`

public final class Color4fShader extends Object implements Shader

- ## Field Summary

  ### Fields inherited from interface icyllis.arc3d.core.shaders.Shader

  `TILE_MODE_CLAMP, TILE_MODE_DECAL, TILE_MODE_MIRROR, TILE_MODE_REPEAT`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Color4fShader(float r, float g, float b, float a, ColorSpace colorSpace)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `float`
  `a()`
  `float`
  `b()`
  `float`
  `g()`
  `ColorSpace`
  `getColorSpace()`
  `boolean`
  `isConstant()`
  Returns true if the shader is guaranteed to produce only a single color.
  `boolean`
  `isOpaque()`
  Returns true if the shader is guaranteed to produce only opaque colors, subject to the Paint using the shader to apply an opaque alpha value.
  `float`
  `r()`
  `void`
  `ref()`
  Increases the reference count by 1.
  `void`
  `unref()`
  Decreases the reference count by 1.

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

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

  ### Methods inherited from interface icyllis.arc3d.core.shaders.Shader

  `makeWithLocalMatrix`

- ## Constructor Details

  - ### Color4fShader

    public Color4fShader(float r, float g, float b, float a, ColorSpace colorSpace)

- ## Method Details

  - ### isOpaque

    public boolean isOpaque()
    Description copied from interface: `Shader`
    Returns true if the shader is guaranteed to produce only opaque colors, subject to the Paint using the shader to apply an opaque alpha value. Subclasses should override this to allow some optimizations.
    Specified by:
      `isOpaque` in interface `Shader`

  - ### isConstant

    public boolean isConstant()
    Returns true if the shader is guaranteed to produce only a single color. Subclasses can override this to allow loop-hoisting optimization.
    Specified by:
      `isConstant` in interface `Shader`

  - ### r

    public float r()

  - ### g

    public float g()

  - ### b

    public float b()

  - ### a

    public float a()

  - ### getColorSpace

    public ColorSpace getColorSpace()

  - ### ref

    public void ref()
    Description copied from interface: `RefCounted`
    Increases the reference count by 1.
    Specified by:
      `ref` in interface `RefCounted`

  - ### unref

    public void unref()
    Description copied from interface: `RefCounted`
    Decreases the reference count by 1.
    Specified by:
      `unref` in interface `RefCounted`