home *** CD-ROM | disk | FTP | other *** search
/ Java 1.2 How-To / JavaHowTo.iso / 3rdParty / jbuilder / unsupported / JDK1.2beta3 / SOURCE / SRC.ZIP / java / awt / PaintContext.java < prev    next >
Encoding:
Java Source  |  1998-03-20  |  1.6 KB  |  56 lines

  1. /*
  2.  * @(#)PaintContext.java    1.15 98/03/18
  3.  *
  4.  * Copyright 1997 by Sun Microsystems, Inc.,
  5.  * 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
  6.  * All rights reserved.
  7.  *
  8.  * This software is the confidential and proprietary information
  9.  * of Sun Microsystems, Inc. ("Confidential Information").  You
  10.  * shall not disclose such Confidential Information and shall use
  11.  * it only in accordance with the terms of the license agreement
  12.  * you entered into with Sun.
  13.  */
  14.  
  15. package java.awt;
  16.  
  17. import java.awt.color.ColorSpace;
  18. import java.awt.image.Raster;
  19. import java.awt.image.ColorModel;
  20.  
  21. /**
  22.  * This interface defines the encapsulated and optimized environment for
  23.  * a paint operation, i.e. generating color patterns in device space for
  24.  * a fill or stroke operation on a Graphics2D.  The PaintContext provides the
  25.  * necessary colors for Graphics2D operations in the form of a Raster
  26.  * associated with a ColorModel.  The PaintContext maintains state for
  27.  * a particular paint operation.  In a multi-threaded environment, several
  28.  * contexts may exist simultaneously for a single Paint object.
  29.  * @see Paint
  30.  * @version 10 Feb 1997
  31.  */
  32.  
  33. public interface PaintContext {
  34.     /**
  35.      * Release the resources allocated for the operation.
  36.      */
  37.     public void dispose();
  38.  
  39.     /**
  40.      * Return the ColorModel of the output.
  41.      */
  42.     ColorModel getColorModel();
  43.  
  44.     /**
  45.      * Return a Tile containing the colors generated for the graphics
  46.      * operation.
  47.      * @param x,y,w,h The area in device space for which colors are
  48.      * generated.
  49.      */
  50.     Raster getRaster(int x,
  51.              int y,
  52.              int w,
  53.              int h);
  54.  
  55. }
  56.