Loading graphics/java/android/graphics/ComposeShader.java +7 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,9 @@ package android.graphics; an {@link android.graphics.Xfermode} subclass. */ public class ComposeShader extends Shader { private final Shader mShaderA; private final Shader mShaderB; /** 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 of from shader B as its "src". Loading @@ -29,6 +32,8 @@ public class ComposeShader extends Shader { is null, then SRC_OVER is assumed. */ public ComposeShader(Shader shaderA, Shader shaderB, Xfermode mode) { mShaderA = shaderA; mShaderB = shaderB; native_instance = nativeCreate1(shaderA.native_instance, shaderB.native_instance, (mode != null) ? mode.native_instance : 0); native_shader = nativePostCreate1(native_instance, shaderA.native_shader, Loading @@ -43,6 +48,8 @@ public class ComposeShader extends Shader { @param mode The PorterDuff mode that combines the colors from the two shaders. */ public ComposeShader(Shader shaderA, Shader shaderB, PorterDuff.Mode mode) { mShaderA = shaderA; mShaderB = shaderB; native_instance = nativeCreate2(shaderA.native_instance, shaderB.native_instance, mode.nativeInt); native_shader = nativePostCreate2(native_instance, shaderA.native_shader, Loading Loading
graphics/java/android/graphics/ComposeShader.java +7 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,9 @@ package android.graphics; an {@link android.graphics.Xfermode} subclass. */ public class ComposeShader extends Shader { private final Shader mShaderA; private final Shader mShaderB; /** 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 of from shader B as its "src". Loading @@ -29,6 +32,8 @@ public class ComposeShader extends Shader { is null, then SRC_OVER is assumed. */ public ComposeShader(Shader shaderA, Shader shaderB, Xfermode mode) { mShaderA = shaderA; mShaderB = shaderB; native_instance = nativeCreate1(shaderA.native_instance, shaderB.native_instance, (mode != null) ? mode.native_instance : 0); native_shader = nativePostCreate1(native_instance, shaderA.native_shader, Loading @@ -43,6 +48,8 @@ public class ComposeShader extends Shader { @param mode The PorterDuff mode that combines the colors from the two shaders. */ public ComposeShader(Shader shaderA, Shader shaderB, PorterDuff.Mode mode) { mShaderA = shaderA; mShaderB = shaderB; native_instance = nativeCreate2(shaderA.native_instance, shaderB.native_instance, mode.nativeInt); native_shader = nativePostCreate2(native_instance, shaderA.native_shader, Loading