Package icyllis.arc3d.granite
Class PaintParams
java.lang.Object
icyllis.arc3d.granite.PaintParams
- All Implemented Interfaces:
AutoCloseable
Parameters used for shading.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfloat
a()
Returns the value of the alpha component, in sRGB space.void
appendToKey
(KeyContext keyContext, KeyBuilder keyBuilder, UniformDataGatherer uniformDataGatherer, TextureDataGatherer textureDataGatherer) float
b()
Returns the value of the blue component, in sRGB space.void
close()
float
g()
Returns the value of the green component, in sRGB space.boolean
getSolidColor
(ImageInfo targetInfo, float[] outColor) Returns true if the paint can be simplified to a solid color, and stores the solid color.static boolean
getSolidColor
(Paint paint, ImageInfo targetInfo, float[] outColor) Similar togetSolidColor(ImageInfo, float[])
, without a PaintParams instance.boolean
Returns true if the paint can be simplified to a solid color, and stores the solid color.static float[]
prepareColorForDst
(float[] color, ImageInfo dstInfo, boolean copyOnWrite) Map into destination color space, in color and result color are non-premultiplied.float
r()
Returns the value of the red component, in sRGB space.
-
Constructor Details
-
PaintParams
-
-
Method Details
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
-
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
-
getColorFilter
-
getFinalBlender
-
getPrimitiveBlender
-
getFinalBlendMode
-
prepareColorForDst
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
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
Similar togetSolidColor(ImageInfo, float[])
, without a PaintParams instance. -
appendToKey
public void appendToKey(KeyContext keyContext, KeyBuilder keyBuilder, UniformDataGatherer uniformDataGatherer, TextureDataGatherer textureDataGatherer)
-