final class LinearGradientContext extends MultipleGradientContext
LinearGradientPaint,
PaintContext,
Paint| Modifier and Type | Field and Description |
|---|---|
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 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
|
a00, a01, a02, a10, a11, a12, cycleMethod, fastGradientArraySize, gradient, GRADIENT_SIZE, GRADIENT_SIZE_INDEX, isSimpleLookup| Constructor and Description |
|---|
LinearGradientContext(LinearGradient paint,
BaseTransform t,
float startx,
float starty,
float endx,
float endy,
float[] fractions,
Color[] colors,
int cycleMethod)
Constructor for LinearGradientContext.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
indexIntoGradientsArraysprivate float dgdX
private float dgdY
private float gc
LinearGradientContext(LinearGradient paint, BaseTransform t, float startx, float starty, float endx, float endy, float[] fractions, Color[] colors, int cycleMethod)
paint - the LinearGradientPaint from which this context
is createdt - the AffineTransform from user
space into device space (gradientTransform should be
concatenated with this)dStart - 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 REPEATprotected void fillRaster(int[] pixels,
int off,
int adjust,
int x,
int y,
int w,
int h)
fillRaster in class MultipleGradientContextx,y,w,h - the area in device space for which colors are
generated.