home *** CD-ROM | disk | FTP | other *** search
/ Apple Developer Connection Student Program / ADC Tools Sampler CD Disk 3 1999.iso / Metrowerks CodeWarrior / Java Support / Java_Source / Java2 / src / java / awt / CompositeContext.java < prev    next >
Encoding:
Java Source  |  1999-05-28  |  2.0 KB  |  60 lines  |  [TEXT/CWIE]

  1. /*
  2.  * @(#)CompositeContext.java    1.20 98/10/19
  3.  *
  4.  * Copyright 1997, 1998 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.image.Raster;
  18. import java.awt.image.WritableRaster;
  19.  
  20. /**
  21.  * The <code>CompositeContext</code> interface defines the encapsulated
  22.  * and optimized environment for a compositing operation.
  23.  * <code>CompositeContext</code> objects maintain state for
  24.  * compositing operations.  In a multi-threaded environment, several
  25.  * contexts can exist simultaneously for a single {@link Composite} 
  26.  * object.
  27.  * @see Composite
  28.  * @version 10 Feb 1997
  29.  */
  30.  
  31. public interface CompositeContext {
  32.     /**
  33.      * Releases resources allocated for a context.
  34.      */
  35.     public void dispose();
  36.  
  37.     /**
  38.      * Composes the two source {@link Raster} objects and 
  39.      * places the result in the destination 
  40.      * {@link WritableRaster}.  Note that the destination 
  41.      * can be the same object as either the first or second 
  42.      * source. Note that <code>dstIn</code> and 
  43.      * <code>dstOut</code> must be compatible with the 
  44.      * <code>dstColorModel</code> passed to the 
  45.      * {@link Composite#createContext(java.awt.image.ColorModel, java.awt.image.ColorModel, java.awt.RenderingHints) createContext} 
  46.      * method of the <code>Composite</code> interface.
  47.      * @param src the first source for the compositing operation
  48.      * @param dstIn the second source for the compositing operation
  49.      * @param dstOut the <code>WritableRaster</code> into which the 
  50.      * result of the operation is stored
  51.      * @see Composite
  52.      */
  53.     public void compose(Raster src,
  54.                         Raster dstIn,
  55.             WritableRaster dstOut);
  56.  
  57.  
  58. }
  59.  
  60.