java.awt
Class GradientPaintContext

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

class GradientPaintContext
extends Object
implements PaintContext


Field Summary
(package private) static WeakReference cached
           
(package private) static ColorModel cachedModel
           
(package private)  boolean cyclic
           
(package private)  double dx
           
(package private)  double dy
           
(package private)  int[] interp
           
(package private)  ColorModel model
           
(package private)  Raster saved
           
(package private)  double x1
           
(package private) static ColorModel xbgrmodel
           
(package private) static ColorModel xrgbmodel
           
(package private)  double y1
           
 
Constructor Summary
GradientPaintContext(ColorModel cm, Point2D p1, Point2D p2, AffineTransform xform, Color c1, Color c2, boolean cyclic)
           
 
Method Summary
(package private)  void clipFillRaster(int[] pixels, int off, int adjust, int w, int h, double rowrel, double dx, double dy)
           
(package private)  void cycleFillRaster(int[] pixels, int off, int adjust, int w, int h, double rowrel, double dx, double dy)
           
 void dispose()
          Release the resources allocated for the operation.
(package private) static Raster getCachedRaster(ColorModel cm, int w, int h)
           
 ColorModel getColorModel()
          Return the ColorModel of the output.
 Raster getRaster(int x, int y, int w, int h)
          Return a Raster containing the colors generated for the graphics operation.
(package private) static void putCachedRaster(ColorModel cm, Raster ras)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

xrgbmodel

static ColorModel xrgbmodel

xbgrmodel

static ColorModel xbgrmodel

cachedModel

static ColorModel cachedModel

cached

static WeakReference cached

x1

double x1

y1

double y1

dx

double dx

dy

double dy

cyclic

boolean cyclic

interp

int[] interp

saved

Raster saved

model

ColorModel model
Constructor Detail

GradientPaintContext

public GradientPaintContext(ColorModel cm,
                            Point2D p1,
                            Point2D p2,
                            AffineTransform xform,
                            Color c1,
                            Color c2,
                            boolean cyclic)
Method Detail

getCachedRaster

static Raster getCachedRaster(ColorModel cm,
                              int w,
                              int h)

putCachedRaster

static void putCachedRaster(ColorModel cm,
                            Raster ras)

dispose

public void dispose()
Release the resources allocated for the operation.

Specified by:
dispose in interface PaintContext

getColorModel

public ColorModel getColorModel()
Return the ColorModel of the output.

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

getRaster

public Raster getRaster(int x,
                        int y,
                        int w,
                        int h)
Return 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.

cycleFillRaster

void cycleFillRaster(int[] pixels,
                     int off,
                     int adjust,
                     int w,
                     int h,
                     double rowrel,
                     double dx,
                     double dy)

clipFillRaster

void clipFillRaster(int[] pixels,
                    int off,
                    int adjust,
                    int w,
                    int h,
                    double rowrel,
                    double dx,
                    double dy)