java.awt
Class ColorPaintContext

java.lang.Object
  extended byjava.awt.ColorPaintContext
All Implemented Interfaces:
PaintContext

class ColorPaintContext
extends Object
implements PaintContext


Field Summary
(package private)  int color
           
(package private)  WritableRaster savedTile
           
 
Constructor Summary
protected ColorPaintContext(int color, ColorModel cm)
           
 
Method Summary
 void dispose()
          Releases the resources allocated for the operation.
 ColorModel getColorModel()
          Returns the ColorModel of the output.
 Raster getRaster(int x, int y, int w, int h)
          Returns a Raster containing the colors generated for the graphics operation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

color

int color

savedTile

WritableRaster savedTile
Constructor Detail

ColorPaintContext

protected ColorPaintContext(int color,
                            ColorModel cm)
Method Detail

dispose

public void dispose()
Description copied from interface: PaintContext
Releases the resources allocated for the operation.

Specified by:
dispose in interface PaintContext

getColorModel

public ColorModel getColorModel()
Description copied from interface: PaintContext
Returns the ColorModel of the output. Note that this ColorModel might be different from the hint specified in the createContext method of Paint. Not all PaintContext objects are capable of generating color patterns in an arbitrary ColorModel.

Specified by:
getColorModel in interface PaintContext
Returns:
the ColorModel of the output.

getRaster

public Raster getRaster(int x,
                        int y,
                        int w,
                        int h)
Description copied from interface: PaintContext
Returns a Raster containing the colors generated for the graphics operation.

Specified by:
getRaster in interface PaintContext
Parameters:
x - the x coordinate of the area in device space for which colors are generated.
y - the y coordinate of the area in device space for which colors are generated.
w - the width of the area in device space
h - the height of the area in device space
Returns:
a Raster representing the specified rectangular area and containing the colors generated for the graphics operation.