Showing the changes to java/pkg/sun/java2d/pipe/DrawImagePipe.java (1 of 18352 files). Show all
Unified · Split
| @@ -0,0 +1,86 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (c) 2001, Oracle and/or its affiliates. All rights reserved. | ||
| 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | ||
| 4 | * | ||
| 5 | * This code is free software; you can redistribute it and/or modify it | ||
| 6 | * under the terms of the GNU General Public License version 2 only, as | ||
| 7 | * published by the Free Software Foundation. Oracle designates this | ||
| 8 | * particular file as subject to the "Classpath" exception as provided | ||
| 9 | * by Oracle in the LICENSE file that accompanied this code. | ||
| 10 | * | ||
| 11 | * This code is distributed in the hope that it will be useful, but WITHOUT | ||
| 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
| 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | ||
| 14 | * version 2 for more details (a copy is included in the LICENSE file that | ||
| 15 | * accompanied this code). | ||
| 16 | * | ||
| 17 | * You should have received a copy of the GNU General Public License version | ||
| 18 | * 2 along with this work; if not, write to the Free Software Foundation, | ||
| 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | ||
| 20 | * | ||
| 21 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA | ||
| 22 | * or visit www.oracle.com if you need additional information or have any | ||
| 23 | * questions. | ||
| 24 | */ | ||
| 25 | |||
| 26 | package sun.java2d.pipe; | ||
| 27 | |||
| 28 | import java.awt.Color; | ||
| 29 | import java.awt.Image; | ||
| 30 | import java.awt.image.BufferedImage; | ||
| 31 | import java.awt.image.BufferedImageOp; | ||
| 32 | import java.awt.image.ImageObserver; | ||
| 33 | import java.awt.geom.AffineTransform; | ||
| 34 | import sun.java2d.SunGraphics2D; | ||
| 35 | |||
| 36 | /** | ||
| 37 | * This interface defines the set of calls that pipeline objects | ||
| 38 | * can use to pass on responsibility for performing various | ||
| 39 | * image copy commands. | ||
| 40 | * There are 3 types of image copies handled by this class: | ||
| 41 | * - copyImage: These methods simply copy the pixels | ||
| 42 | * from the src to dest, either from (0, 0) (implicit) | ||
| 43 | * or from a given (sx, sy) location. | ||
| 44 | * - scaleImage: These methods copy from src to dest while | ||
| 45 | * scaling the source image. The src and dest rectangles | ||
| 46 | * are used to specify the scale. | ||
| 47 | * - copyImageBg: These methods behave the same as the | ||
| 48 | * copyImage methods except they substitute the given | ||
| 49 | * background color for any transparent pixels. | ||
| 50 | * - scaleImageBg: These methods behave the same as the | ||
| 51 | * scaleImage methods except they substitute the given | ||
| 52 | * background color for any transparent pixels. | ||
| 53 | * - transformImage.... | ||
| 54 | */ | ||
| 55 | public interface DrawImagePipe { | ||
| 56 | |||
| 57 | public boolean copyImage(SunGraphics2D sg, Image img, | ||
| 58 | int x, int y, | ||
| 59 | Color bgColor, | ||
| 60 | ImageObserver observer); | ||
| 61 | |||
| 62 | public boolean copyImage(SunGraphics2D sg, Image img, | ||
| 63 | int dx, int dy, int sx, int sy, int w, int h, | ||
| 64 | Color bgColor, | ||
| 65 | ImageObserver observer); | ||
| 66 | |||
| 67 | public boolean scaleImage(SunGraphics2D sg, Image img, int x, int y, | ||
| 68 | int width, int height, | ||
| 69 | Color bgColor, | ||
| 70 | ImageObserver observer); | ||
| 71 | |||
| 72 | public boolean scaleImage(SunGraphics2D sg, Image img, | ||
| 73 | int dx1, int dy1, int dx2, int dy2, | ||
| 74 | int sx1, int sy1, int sx2, int sy2, | ||
| 75 | Color bgColor, | ||
| 76 | ImageObserver observer); | ||
| 77 | |||
| 78 | public boolean transformImage(SunGraphics2D sg, Image img, | ||
| 79 | AffineTransform atfm, | ||
| 80 | ImageObserver observer); | ||
| 81 | |||
| 82 | public void transformImage(SunGraphics2D sg, BufferedImage img, | ||
| 83 | BufferedImageOp op, int x, int y); | ||
| 84 | |||
| 85 | |||
| 86 | } | ||