| java.lang.Object java.awt.MultipleGradientPaintContext
All known Subclasses: java.awt.RadialGradientPaintContext, java.awt.LinearGradientPaintContext,
MultipleGradientPaintContext | abstract class MultipleGradientPaintContext implements PaintContext(Code) | | This is the superclass for all PaintContexts which use a multiple color
gradient to fill in their raster. It provides the actual color
interpolation functionality. Subclasses only have to deal with using
the gradient to fill pixels in a raster.
author: Nicholas Talian, Vincent Hardy, Jim Graham, Jerry Evans |
Field Summary | |
final protected static int | GRADIENT_SIZE Constant number of max colors between any 2 arbitrary colors. | final protected static int | GRADIENT_SIZE_INDEX | protected float | a00a01a10a11a02a12 Elements of the inverse transform matrix. | protected static WeakReference<Raster> | cached The cached raster, which is reusable among instances. | protected static ColorModel | cachedModel The cached ColorModel. | protected ColorSpaceType | colorSpace | protected CycleMethod | cycleMethod The method to use when painting out of the gradient bounds. | protected int | fastGradientArraySize Size of gradients array for scaling the 0-1 index when looking up
colors the fast way. | protected int[] | gradient Array which contains the interpolated color values for each interval,
used by calculateSingleArrayGradient(). | protected boolean | isSimpleLookup This boolean specifies wether we are in simple lookup mode, where an
input value between 0 and 1 may be used to directly index into a single
array of gradient colors. | protected ColorModel | model The PaintContext's ColorModel. | protected Raster | saved Raster is reused whenever possible. |
GRADIENT_SIZE | final protected static int GRADIENT_SIZE(Code) | | Constant number of max colors between any 2 arbitrary colors.
Used for creating and indexing gradients arrays.
|
GRADIENT_SIZE_INDEX | final protected static int GRADIENT_SIZE_INDEX(Code) | | |
a00a01a10a11a02a12 | protected float a00a01a10a11a02a12(Code) | | Elements of the inverse transform matrix.
|
cached | protected static WeakReference<Raster> cached(Code) | | The cached raster, which is reusable among instances.
|
colorSpace | protected ColorSpaceType colorSpace(Code) | | The ColorSpace in which to perform the interpolation
|
cycleMethod | protected CycleMethod cycleMethod(Code) | | The method to use when painting out of the gradient bounds.
|
fastGradientArraySize | protected int fastGradientArraySize(Code) | | Size of gradients array for scaling the 0-1 index when looking up
colors the fast way.
|
gradient | protected int[] gradient(Code) | | Array which contains the interpolated color values for each interval,
used by calculateSingleArrayGradient(). It is protected for possible
direct access by subclasses.
|
isSimpleLookup | protected boolean isSimpleLookup(Code) | | This boolean specifies wether we are in simple lookup mode, where an
input value between 0 and 1 may be used to directly index into a single
array of gradient colors. If this boolean value is false, then we have
to use a 2-step process where we have to determine which gradient array
we fall into, then determine the index into that array.
|
model | protected ColorModel model(Code) | | The PaintContext's ColorModel. This is ARGB if colors are not all
opaque, otherwise it is RGB.
|
saved | protected Raster saved(Code) | | Raster is reused whenever possible.
|
dispose | final public void dispose()(Code) | | |
fillRaster | abstract protected void fillRaster(int pixels, int off, int adjust, int x, int y, int w, int h)(Code) | | |
getRaster | final public Raster getRaster(int x, int y, int w, int h)(Code) | | |
indexIntoGradientsArrays | final protected int indexIntoGradientsArrays(float position)(Code) | | Helper function to index into the gradients array. This is necessary
because each interval has an array of colors with uniform size 255.
However, the color intervals are not necessarily of uniform length, so
a conversion is required.
Parameters: position - the unmanipulated position, which will be mappedinto the range 0 to 1 |
|
|