Java Platform 1.2
Beta 4

Interface java.awt.Paint

All Known Implementing Classes:
Color, GradientPaint, TexturePaint

public abstract 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 draw 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.

See Also:
PaintContext, Color, GradientPaint, TexturePaint, Graphics2D.setPaint(java.awt.Paint)

Fields inherited from class java.awt.Transparency
BITMASK , OPAQUE , TRANSLUCENT
 
Method Summary
 PaintContext createContext(ColorModel cm, Rectangle deviceBounds, Rectangle2D userBounds, AffineTransform xform, RenderingHints hints)
          Create and return a context used to generate the color pattern.
 
Methods inherited from interface java.awt.Transparency
getTransparency
 

Method Detail

createContext

public PaintContext createContext(ColorModel cm,
                                  Rectangle deviceBounds,
                                  Rectangle2D userBounds,
                                  AffineTransform xform,
                                  RenderingHints hints)
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.
hints - The hint for the context object to choose between rendering alternatives.
Returns:
The PaintContext for generating color patterns.
See Also:
PaintContext

Java Platform 1.2
Beta 4

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.
This documentation was generated with a post-Beta4 version of Javadoc.