Index (Frames) | Index (No Frames) | Package | Package Tree | Tree
java.awt

Interface Paint

java.lang.Object
|
+--java.awt.Transparency
   |
   +--java.awt.Paint

All Implemented Interfaces:

Transparency


public interface Paint

implements Transparency

Defines how color patterns are generated for Graphics2D operations. This is used to perform the draw and fill methods of the graphics object. Instances must be immutable, because the graphics object does not clone them.

Since:Author:See Also:

Method Summary

java.awt.PaintContextcreateContext(java.awt.image.ColorModel cm, java.awt.Rectangle deviceBounds, java.awt.geom.Rectangle2D userBounds, java.awt.geom.AffineTransform xform, java.awt.RenderingHints hints)

Create the context necessary for performing the color pattern generation.

Method Details

createContext

public PaintContext createContext(java.awt.image.ColorModel cm, java.awt.Rectangle deviceBounds, java.awt.geom.Rectangle2D userBounds, java.awt.geom.AffineTransform xform, java.awt.RenderingHints hints)

Create the context necessary for performing the color pattern generation. The color model is a hint, and may be null for Classpath implementations; however some legacy code may throw a NullPointerException when passed a null. Leaving the color model null provides the most efficiency and leeway in the generation of the color pattern.

Parameters:

Returns: