Class ComposeShader

java.lang.Object
icyllis.modernui.graphics.Shader
icyllis.modernui.graphics.ComposeShader

public class ComposeShader extends Shader
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
  • Constructor Details

    • ComposeShader

      public ComposeShader(@NonNull BlendMode mode, @NonNull Shader src, @NonNull Shader dst)
      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 mode
      dst - The colors from this shader are seen as the "dst" by the mode