Skip to content

Most visited

Recently visited

navigation

ComposeShader

public class ComposeShader
extends Shader

java.lang.Object
   ↳ android.graphics.Shader
     ↳ android.graphics.ComposeShader


A subclass of shader that returns the composition of two other shaders, combined by an Xfermode subclass.

Summary

Public constructors

ComposeShader(Shader shaderA, Shader shaderB, Xfermode mode)

Create a new compose shader, given shaders A, B, and a combining mode.

ComposeShader(Shader shaderA, Shader shaderB, PorterDuff.Mode mode)

Create a new compose shader, given shaders A, B, and a combining PorterDuff mode.

Inherited methods

From class android.graphics.Shader
From class java.lang.Object

Public constructors

ComposeShader

Added in API level 1
ComposeShader (Shader shaderA, 
                Shader shaderB, 
                Xfermode mode)

Create a new compose shader, given shaders A, B, and a combining mode. When the mode is applied, it will be given the result from shader A as its "dst", and the result from shader B as its "src".

Parameters
shaderA Shader: The colors from this shader are seen as the "dst" by the mode
shaderB Shader: The colors from this shader are seen as the "src" by the mode
mode Xfermode: The mode that combines the colors from the two shaders. If mode is null, then SRC_OVER is assumed.

ComposeShader

Added in API level 1
ComposeShader (Shader shaderA, 
                Shader shaderB, 
                PorterDuff.Mode mode)

Create a new compose shader, given shaders A, B, and a combining PorterDuff mode. When the mode is applied, it will be given the result from shader A as its "dst", and the result from shader B as its "src".

Parameters
shaderA Shader: The colors from this shader are seen as the "dst" by the mode
shaderB Shader: The colors from this shader are seen as the "src" by the mode
mode PorterDuff.Mode: The PorterDuff mode that combines the colors from the two shaders.
This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.

Take a one-minute survey?
Help us improve Android tools and documentation.