Contents | Package | Class | Tree | Deprecated | Index | Help Java 1.2 Beta 3
PREV | NEXT SHOW LISTS | HIDE LISTS

Interface java.awt.Paint

Implementing Classes:
Color, GradientPaint, TexturePaint

public interface Paint
extends Transparency
This interface defines how color patterns can be generated for Graphics2D operations. Paint is set in the Graphics2D and thereafter the stroke and fill methods will use the color pattern generated by the implementing Paint class.

Instances of classes implementing Paint must be immutable (i.e. read-only) because the Graphics2D does not clone these objects when they are set as an attribute with the setPaint method or when the Graphics2D object is itself cloned. This is to avoid undefined behavior of Graphics2D rendering which would result if the Paint object were modified after being set in the Graphics2D state.

See Also:
PaintContext, Color, GradientPaint, TexturePaint, setPaint

Method Summary
PaintContext  createContext(ColorModel cm, Rectangle deviceBounds, Rectangle2D userBounds, AffineTransform xform)
Create and return a context used to generate the color pattern.
 

Method Detail

createContext

public PaintContext createContext(ColorModel cm,
                                  Rectangle deviceBounds,
                                  Rectangle2D userBounds,
                                  AffineTransform xform)
Create and return a context used to generate the color pattern.
Parameters:
cm - ColorModel in which the caller wishes to receive the paint data. This is used only as a hint.
deviceBounds - The Rectangle describing the bounding box in device space of the graphics primitive being rendered.
userBounds - The Rectangle2D describing the bounding box in user space of the graphics primitive being rendered.
xform - The Transform from user space into device space.
Returns:
The PaintContext for generating color patterns.
See Also:
PaintContext

Contents | Package | Class | Tree | Deprecated | Index | Help Java 1.2 Beta 3
PREV | NEXT SHOW LISTS | HIDE LISTS

Submit a bug or feature
Submit comments/suggestions about new javadoc look.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-1998 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.