01: /*
02: * Copyright 2001 Sun Microsystems, Inc. All Rights Reserved.
03: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
04: *
05: * This code is free software; you can redistribute it and/or modify it
06: * under the terms of the GNU General Public License version 2 only, as
07: * published by the Free Software Foundation. Sun designates this
08: * particular file as subject to the "Classpath" exception as provided
09: * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
22: * CA 95054 USA or visit www.sun.com if you need additional information or
23: * have any 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, int x, int y,
58: Color bgColor, ImageObserver observer);
59:
60: public boolean copyImage(SunGraphics2D sg, Image img, int dx,
61: int dy, int sx, int sy, int w, int h, Color bgColor,
62: ImageObserver observer);
63:
64: public boolean scaleImage(SunGraphics2D sg, Image img, int x,
65: int y, int width, int height, Color bgColor,
66: ImageObserver observer);
67:
68: public boolean scaleImage(SunGraphics2D sg, Image img, int dx1,
69: int dy1, int dx2, int dy2, int sx1, int sy1, int sx2,
70: int sy2, Color bgColor, ImageObserver observer);
71:
72: public boolean transformImage(SunGraphics2D sg, Image img,
73: AffineTransform atfm, ImageObserver observer);
74:
75: public void transformImage(SunGraphics2D sg, BufferedImage img,
76: BufferedImageOp op, int x, int y);
77:
78: }
|