final class LinearGradientPaintContext extends MultipleGradientPaintContext
PaintContext
,
Paint
,
GradientPaint
Modifier and Type | Field and Description |
---|---|
private static int |
ANTI_ALIAS_IMPL |
private static int |
DEFAULT_IMPL |
private float |
dgdX
The following invariants are used to process the gradient value from
a device space coordinate, (X, Y):
g(X, Y) = dgdX*X + dgdY*Y + gc
|
private float |
dgdY
The following invariants are used to process the gradient value from
a device space coordinate, (X, Y):
g(X, Y) = dgdX*X + dgdY*Y + gc
|
private int |
fillMethod |
private float |
gc
The following invariants are used to process the gradient value from
a device space coordinate, (X, Y):
g(X, Y) = dgdX*X + dgdY*Y + gc
|
private float |
pixSz
The following invariants are used to process the gradient value from
a device space coordinate, (X, Y):
g(X, Y) = dgdX*X + dgdY*Y + gc
|
a00, a01, a02, a10, a11, a12, cached, cachedModel, colorSpace, cycleMethod, dataModel, DEBUG, fastGradientArraySize, fractions, gradient, GRADIENT_SIZE, GRADIENT_SIZE_INDEX, gradientAverage, gradientOverflow, gradients, gradientsLength, gradientUnderflow, hasDiscontinuity, isSimpleLookup, model, normalizedIntervals, saved
Constructor and Description |
---|
LinearGradientPaintContext(java.awt.image.ColorModel cm,
java.awt.Rectangle deviceBounds,
java.awt.geom.Rectangle2D userBounds,
java.awt.geom.AffineTransform t,
java.awt.RenderingHints hints,
java.awt.geom.Point2D dStart,
java.awt.geom.Point2D dEnd,
float[] fractions,
java.awt.Color[] colors,
MultipleGradientPaint.CycleMethodEnum cycleMethod,
MultipleGradientPaint.ColorSpaceEnum colorSpace)
Constructor for LinearGradientPaintContext.
|
Modifier and Type | Method and Description |
---|---|
protected void |
fillHardNoCycle(int[] pixels,
int off,
int adjust,
int x,
int y,
int w,
int h) |
protected void |
fillRaster(int[] pixels,
int off,
int adjust,
int x,
int y,
int w,
int h)
Return a Raster containing the colors generated for the graphics
operation.
|
protected void |
fillSimpleNoCycle(int[] pixels,
int off,
int adjust,
int x,
int y,
int w,
int h) |
protected void |
fillSimpleReflect(int[] pixels,
int off,
int adjust,
int x,
int y,
int w,
int h) |
protected void |
fillSimpleRepeat(int[] pixels,
int off,
int adjust,
int x,
int y,
int w,
int h) |
calculateGradientFractions, dispose, getCachedRaster, getColorModel, getRaster, indexGradientAntiAlias, indexIntoGradientsArrays, putCachedRaster
private float dgdX
private float dgdY
private float gc
private float pixSz
private static final int DEFAULT_IMPL
private static final int ANTI_ALIAS_IMPL
private int fillMethod
public LinearGradientPaintContext(java.awt.image.ColorModel cm, java.awt.Rectangle deviceBounds, java.awt.geom.Rectangle2D userBounds, java.awt.geom.AffineTransform t, java.awt.RenderingHints hints, java.awt.geom.Point2D dStart, java.awt.geom.Point2D dEnd, float[] fractions, java.awt.Color[] colors, MultipleGradientPaint.CycleMethodEnum cycleMethod, MultipleGradientPaint.ColorSpaceEnum colorSpace) throws java.awt.geom.NoninvertibleTransformException
cm
- ColorModel
that receives
the Paint
data. This is used only as a hint.deviceBounds
- the device space bounding box of the
graphics primitive being rendereduserBounds
- the user space bounding box of the
graphics primitive being renderedt
- the AffineTransform
from user
space into device space (gradientTransform should be
concatenated with this)hints
- the hints that the context object uses to choose
between rendering alternativesdStart
- gradient start point, in user spacedEnd
- gradient end point, in user spacefractions
- the fractions specifying the gradient distributioncolors
- the gradient colorscycleMethod
- either NO_CYCLE, REFLECT, or REPEATcolorSpace
- which colorspace to use for interpolation,
either SRGB or LINEAR_RGBjava.awt.geom.NoninvertibleTransformException
protected void fillHardNoCycle(int[] pixels, int off, int adjust, int x, int y, int w, int h)
protected void fillSimpleNoCycle(int[] pixels, int off, int adjust, int x, int y, int w, int h)
protected void fillSimpleRepeat(int[] pixels, int off, int adjust, int x, int y, int w, int h)
protected void fillSimpleReflect(int[] pixels, int off, int adjust, int x, int y, int w, int h)
protected void fillRaster(int[] pixels, int off, int adjust, int x, int y, int w, int h)
fillRaster
in class MultipleGradientPaintContext
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 for which colors
are generated.h
- The height of the area in device space for which colors
are generated.