Package icyllis.arc3d.granite
Class PaintParams
java.lang.Object
icyllis.arc3d.granite.PaintParams
- All Implemented Interfaces:
AutoCloseable
Parameters used for shading.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfloata()Returns the value of the alpha component, in sRGB space.voidappendToKey(KeyContext keyContext, KeyBuilder keyBuilder, UniformDataGatherer uniformDataGatherer, TextureDataGatherer textureDataGatherer) floatb()Returns the value of the blue component, in sRGB space.voidclose()floatg()Returns the value of the green component, in sRGB space.@RawPtr @Nullable ColorFilter@NonNull BlendModebooleangetSolidColor(ImageInfo targetInfo, float @Nullable [] outColor) Returns true if the paint can be simplified to a solid color, and stores the solid color.static booleangetSolidColor(Paint paint, ImageInfo targetInfo, float[] outColor) Similar togetSolidColor(ImageInfo, float[]), without a PaintParams instance.booleanReturns 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.floatr()Returns the value of the red component, in sRGB space.
-
Constructor Details
-
PaintParams
-
-
Method Details
-
close
public void close()- Specified by:
closein 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)
-