home *** CD-ROM | disk | FTP | other *** search
Java Source | 1998-03-20 | 1.6 KB | 56 lines |
- /*
- * @(#)PaintContext.java 1.15 98/03/18
- *
- * Copyright 1997 by Sun Microsystems, Inc.,
- * 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
- * All rights reserved.
- *
- * This software is the confidential and proprietary information
- * of Sun Microsystems, Inc. ("Confidential Information"). You
- * shall not disclose such Confidential Information and shall use
- * it only in accordance with the terms of the license agreement
- * you entered into with Sun.
- */
-
- package java.awt;
-
- import java.awt.color.ColorSpace;
- import java.awt.image.Raster;
- import java.awt.image.ColorModel;
-
- /**
- * This interface defines the encapsulated and optimized environment for
- * a paint operation, i.e. generating color patterns in device space for
- * a fill or stroke operation on a Graphics2D. The PaintContext provides the
- * necessary colors for Graphics2D operations in the form of a Raster
- * associated with a ColorModel. The PaintContext maintains state for
- * a particular paint operation. In a multi-threaded environment, several
- * contexts may exist simultaneously for a single Paint object.
- * @see Paint
- * @version 10 Feb 1997
- */
-
- public interface PaintContext {
- /**
- * Release the resources allocated for the operation.
- */
- public void dispose();
-
- /**
- * Return the ColorModel of the output.
- */
- ColorModel getColorModel();
-
- /**
- * Return a Tile containing the colors generated for the graphics
- * operation.
- * @param x,y,w,h The area in device space for which colors are
- * generated.
- */
- Raster getRaster(int x,
- int y,
- int w,
- int h);
-
- }
-