diff options
author | Bryce McKinlay <bryce@waitaki.otago.ac.nz> | 2002-08-09 04:26:17 +0000 |
---|---|---|
committer | Bryce McKinlay <bryce@gcc.gnu.org> | 2002-08-09 05:26:17 +0100 |
commit | 7bde45b2eb84502b62e77e46d947e46dcbd333d6 (patch) | |
tree | cdf9958b411887bead2263ea8ef0bdfc8eae6319 /libjava/java/awt/PaintContext.java | |
parent | 097684ce62b505168739fc98e952f92a8719a1fa (diff) | |
download | gcc-7bde45b2eb84502b62e77e46d947e46dcbd333d6.zip gcc-7bde45b2eb84502b62e77e46d947e46dcbd333d6.tar.gz gcc-7bde45b2eb84502b62e77e46d947e46dcbd333d6.tar.bz2 |
AWT/Swing merge from GNU Classpath.
From-SVN: r56147
Diffstat (limited to 'libjava/java/awt/PaintContext.java')
-rw-r--r-- | libjava/java/awt/PaintContext.java | 47 |
1 files changed, 33 insertions, 14 deletions
diff --git a/libjava/java/awt/PaintContext.java b/libjava/java/awt/PaintContext.java index 6393118..fa26061 100644 --- a/libjava/java/awt/PaintContext.java +++ b/libjava/java/awt/PaintContext.java @@ -1,4 +1,5 @@ -/* Copyright (C) 2000, 2002 Free Software Foundation +/* PaintContext.java -- the environment for performing a paint operation + Copyright (C) 2000, 2002 Free Software Foundation This file is part of GNU Classpath. @@ -37,21 +38,39 @@ exception statement from your version. */ package java.awt; -/** - * @author Warren Levy <warrenl@cygnus.com> - * @date March 16, 2000. - */ +import java.awt.image.ColorModel; +import java.awt.image.Raster; /** - * Written using on-line Java Platform 1.2 API Specification, as well - * as "The Java Class Libraries", 2nd edition (Addison-Wesley, 1998). - * Status: Partially stubbed. + * @author Warren Levy <warrenl@cygnus.com> + * @see Paint + * @since 1.1 + * @status updated to 1.4 */ - public interface PaintContext { - public void dispose(); - // FIXME - // public ColorModel getColorModel(); - // public Raster getRaster(int x, int y, int w, int h); -} + /** + * Release the resources allocated for the paint. + */ + void dispose(); + + /** + * Return the color model of this context. It may be different from the + * hint specified during createContext, as not all contexts can generate + * color patterns in an arbitrary model. + * + * @return the context color model + */ + ColorModel getColorModel(); + + /** + * Return a raster containing the colors for the graphics operation. + * + * @param x the x-coordinate, in device space + * @param y the y-coordinate, in device space + * @param w the width, in device space + * @param h the height, in device space + * @return a raster for the given area and color + */ + Raster getRaster(int x, int y, int w, int h); +} // interface PaintContext |