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 import java.awt.Paint; 20 21 /** A subclass of shader that returns the composition of two other shaders, combined by 22 an {@link android.graphics.Xfermode} subclass. 23 */ 24 public class ComposeShader extends Shader { 25 /** Create a new compose shader, given shaders A, B, and a combining mode. 26 When the mode is applied, it will be given the result from shader A as its 27 "dst", and the result of from shader B as its "src". 28 @param shaderA The colors from this shader are seen as the "dst" by the mode 29 @param shaderB The colors from this shader are seen as the "src" by the mode 30 @param mode The mode that combines the colors from the two shaders. If mode 31 is null, then SRC_OVER is assumed. 32 */ 33 public ComposeShader(Shader shaderA, Shader shaderB, Xfermode mode) { 34 // FIXME Implement shader 35 } 36 37 /** Create a new compose shader, given shaders A, B, and a combining PorterDuff mode. 38 When the mode is applied, it will be given the result from shader A as its 39 "dst", and the result of from shader B as its "src". 40 @param shaderA The colors from this shader are seen as the "dst" by the mode 41 @param shaderB The colors from this shader are seen as the "src" by the mode 42 @param mode The PorterDuff mode that combines the colors from the two shaders. 43 */ 44 public ComposeShader(Shader shaderA, Shader shaderB, PorterDuff.Mode mode) { 45 // FIXME Implement shader 46 } 47 48 @Override 49 Paint getJavaPaint() { 50 return null; 51 } 52 } 53 54