aboutsummaryrefslogtreecommitdiff
path: root/libjava/java/awt/PaintContext.java
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/java/awt/PaintContext.java')
-rw-r--r--libjava/java/awt/PaintContext.java47
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