Class PaintParams

java.lang.Object
icyllis.arc3d.granite.PaintParams
All Implemented Interfaces:
AutoCloseable

public final class PaintParams extends Object implements AutoCloseable
Parameters used for shading.
  • Constructor Details

  • Method Details

    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
    • r

      public float r()
      Returns the value of the red component, in sRGB space.
    • g

      public float g()
      Returns the value of the green component, in sRGB space.
    • b

      public float b()
      Returns the value of the blue component, in sRGB space.
    • a

      public float a()
      Returns the value of the alpha component, in sRGB space.
    • getShader

      @RawPtr public @RawPtr Shader getShader()
    • getColorFilter

      @RawPtr public @RawPtr ColorFilter getColorFilter()
    • getFinalBlender

      @RawPtr public @RawPtr Blender getFinalBlender()
    • getPrimitiveBlender

      @RawPtr public @RawPtr Blender getPrimitiveBlender()
    • getFinalBlendMode

      @Nonnull public BlendMode getFinalBlendMode()
    • prepareColorForDst

      public static float[] prepareColorForDst(float[] color, ImageInfo dstInfo, boolean copyOnWrite)
      Map into destination color space, in color and result color are non-premultiplied.
    • isSolidColor

      public boolean isSolidColor()
      Returns true if the paint can be simplified to a solid color, and stores the solid color.
    • getSolidColor

      public boolean getSolidColor(ImageInfo targetInfo, @Nullable float[] outColor)
      Returns true if the paint can be simplified to a solid color, and stores the solid color. The color will be transformed to the target's color space and premultiplied.
    • getSolidColor

      public static boolean getSolidColor(Paint paint, ImageInfo targetInfo, float[] outColor)
      Similar to getSolidColor(ImageInfo, float[]), without a PaintParams instance.
    • appendToKey

      public void appendToKey(KeyContext keyContext, KeyBuilder keyBuilder, UniformDataGatherer uniformDataGatherer, TextureDataGatherer textureDataGatherer)