JSR-62 (Final)

java.awt
Interface Composite

All Known Implementing Classes:
AlphaComposite

public interface Composite

The Composite interface defines the methods to compose a draw primitive with the underlying graphics area. After the Composite is set in the Graphics2D context, it combines a shape, text, or an image being rendered with the colors that have already been rendered according to pre-defined rules. The composition rules are provided by the classes implementing this interface.

Instances of classes implementing Composite must be immutable because the Graphics2D does not clone these objects when they are set as an attribute with the setComposite method or when the Graphics2D object is cloned. This is to avoid undefined rendering behavior of Graphics2D, resulting from the modification of the Composite object after it has been set in the Graphics2D context.

Note that use of Composite is restricted in this Profile; only instances AlphaComposite may be used to set the Composite of Graphics2D.

See Also:
AlphaComposite, Graphics2D.setComposite(java.awt.Composite)


JSR-62 (Final)

Java and Java 2D are trademarks or registered trademarks of Sun Microsystems, Inc. in the U.S. and other countries.
Copyright 1993 - 2002 Sun Microsystems, Inc., 901 San Antonio Road, Palo Alto, California 94303, U.S.A. All Rights Reserved.
Use of this specification is subject to this license.