1/* 2 * Licensed to the Apache Software Foundation (ASF) under one or more 3 * contributor license agreements. See the NOTICE file distributed with 4 * this work for additional information regarding copyright ownership. 5 * The ASF licenses this file to You under the Apache License, Version 2.0 6 * (the "License"); you may not use this file except in compliance with 7 * the License. You may obtain a copy of the License at 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 * See the License for the specific language governing permissions and 15 * limitations under the License. 16 */ 17/** 18 * @author Alexey A. Petrenko 19 * @version $Revision$ 20 */ 21 22package java.awt; 23 24import java.awt.geom.AffineTransform; 25import java.awt.geom.Rectangle2D; 26import java.awt.image.ColorModel; 27 28/** 29 * The Paint interface provides possibility of generating color patterns in 30 * device space for fill, draw, or stroke operations in a Graphics2D. 31 * 32 * @since Android 1.0 33 */ 34public interface Paint extends Transparency { 35 36 /** 37 * Creates the PaintContext which is used to generate color patterns for 38 * rendering operations of Graphics2D. 39 * 40 * @param cm 41 * the ColorModel object, or null. 42 * @param deviceBounds 43 * the Rectangle represents the bounding box of device space for 44 * the graphics rendering operations. 45 * @param userBounds 46 * the Rectangle represents bounding box of user space for the 47 * graphics rendering operations. 48 * @param xform 49 * the AffineTransform for translation from user space to device 50 * space. 51 * @param hints 52 * the RenderingHints preferences. 53 * @return the PaintContext for generating color patterns. 54 */ 55 PaintContext createContext(ColorModel cm, Rectangle deviceBounds, Rectangle2D userBounds, 56 AffineTransform xform, RenderingHints hints); 57} 58