KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > java > awt > CompositeContext


1 /*
2  * @(#)CompositeContext.java 1.25 03/12/19
3  *
4  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7
8 package java.awt;
9
10 import java.awt.image.Raster JavaDoc;
11 import java.awt.image.WritableRaster JavaDoc;
12
13 /**
14  * The <code>CompositeContext</code> interface defines the encapsulated
15  * and optimized environment for a compositing operation.
16  * <code>CompositeContext</code> objects maintain state for
17  * compositing operations. In a multi-threaded environment, several
18  * contexts can exist simultaneously for a single {@link Composite}
19  * object.
20  * @see Composite
21  * @version 10 Feb 1997
22  */

23
24 public interface CompositeContext {
25     /**
26      * Releases resources allocated for a context.
27      */

28     public void dispose();
29
30     /**
31      * Composes the two source {@link Raster} objects and
32      * places the result in the destination
33      * {@link WritableRaster}. Note that the destination
34      * can be the same object as either the first or second
35      * source. Note that <code>dstIn</code> and
36      * <code>dstOut</code> must be compatible with the
37      * <code>dstColorModel</code> passed to the
38      * {@link Composite#createContext(java.awt.image.ColorModel, java.awt.image.ColorModel, java.awt.RenderingHints) createContext}
39      * method of the <code>Composite</code> interface.
40      * @param src the first source for the compositing operation
41      * @param dstIn the second source for the compositing operation
42      * @param dstOut the <code>WritableRaster</code> into which the
43      * result of the operation is stored
44      * @see Composite
45      */

46     public void compose(Raster JavaDoc src,
47                         Raster JavaDoc dstIn,
48             WritableRaster JavaDoc dstOut);
49
50
51 }
52
53
Popular Tags