Package icyllis.modernui.graphics
Class ComposeShader
java.lang.Object
icyllis.modernui.graphics.Shader
icyllis.modernui.graphics.ComposeShader
A shader subclass that composites (blends) two shaders into one, with the given
composite mode
. This is used to construct a shader tree.- Since:
- 3.12
-
Nested Class Summary
Nested classes/interfaces inherited from class icyllis.modernui.graphics.Shader
Shader.TileMode
-
Constructor Summary
ConstructorsConstructorDescriptionComposeShader
(BlendMode mode, Shader src, Shader dst) Create a new compose shader, given shaders source, destination, and a composite mode. -
Method Summary
-
Constructor Details
-
ComposeShader
Create a new compose shader, given shaders source, destination, and a composite mode. When the mode is applied, it will be given the result from shader src as its "src", and the result from shader dst as its "dst".You can release the given shaders immediately after creating the compose shader.
- Parameters:
mode
- The blend mode that combines the colors from the two shaders.src
- The colors from this shader are seen as the "src" by the modedst
- The colors from this shader are seen as the "dst" by the mode
-