1 /* 2 * Copyright (C) 2008 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package android.graphics; 18 19 /** A subclass of shader that returns the composition of two other shaders, combined by 20 an {@link android.graphics.Xfermode} subclass. 21 */ 22 public class ComposeShader extends Shader { 23 /** Create a new compose shader, given shaders A, B, and a combining mode. 24 When the mode is applied, it will be given the result from shader A as its 25 "dst", and the result of from shader B as its "src". 26 @param shaderA The colors from this shader are seen as the "dst" by the mode 27 @param shaderB The colors from this shader are seen as the "src" by the mode 28 @param mode The mode that combines the colors from the two shaders. If mode 29 is null, then SRC_OVER is assumed. 30 */ ComposeShader(Shader shaderA, Shader shaderB, Xfermode mode)31 public ComposeShader(Shader shaderA, Shader shaderB, Xfermode mode) { 32 // FIXME Implement shader 33 } 34 35 /** Create a new compose shader, given shaders A, B, and a combining PorterDuff mode. 36 When the mode is applied, it will be given the result from shader A as its 37 "dst", and the result of from shader B as its "src". 38 @param shaderA The colors from this shader are seen as the "dst" by the mode 39 @param shaderB The colors from this shader are seen as the "src" by the mode 40 @param mode The PorterDuff mode that combines the colors from the two shaders. 41 */ ComposeShader(Shader shaderA, Shader shaderB, PorterDuff.Mode mode)42 public ComposeShader(Shader shaderA, Shader shaderB, PorterDuff.Mode mode) { 43 // FIXME Implement shader 44 } 45 } 46 47