From 71946bc3b406beb3d1fb9b447204e4236d645c43 Mon Sep 17 00:00:00 2001 From: bryce Date: Fri, 9 Aug 2002 04:26:17 +0000 Subject: AWT/Swing merge from GNU Classpath. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@56147 138bc75d-0d04-0410-961f-82ee72b054a4 --- libjava/java/awt/PaintContext.java | 47 ++++++++++++++++++++++++++------------ 1 file changed, 33 insertions(+), 14 deletions(-) (limited to 'libjava/java/awt/PaintContext.java') diff --git a/libjava/java/awt/PaintContext.java b/libjava/java/awt/PaintContext.java index 6393118690b..fa26061f0ea 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 - * @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 + * @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 -- cgit v1.2.1