Top Description Fields Constructors Methods
com.sun.prism.impl.paint

pack-priv final Class LinearGradientContext

extends MultipleGradientContext
Class Inheritance
Imports
com.sun.javafx.geom.transform.BaseTransform, com.sun.prism.paint.Color, .LinearGradient

Provides the actual implementation for the LinearGradientPaint. This is where the pixel processing is done.
See Also
java.awt.LinearGradientPaint, java.awt.PaintContext, java.awt.Paint

Field Summary

Modifier and TypeField 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

Inherited from com.sun.prism.impl.paint.MultipleGradientContext:
a00a01a02a10a11a12cycleMethodfastGradientArraySizegradientGRADIENT_SIZEGRADIENT_SIZE_INDEXisSimpleLookup

Constructor Summary

AccessConstructor and Description
pack-priv
LinearGradientContext(LinearGradient
the LinearGradientPaint from which this context is created
paint
,
BaseTransform
the AffineTransform from user space into device space (gradientTransform should be concatenated with this)
t
,
float startx, float starty, float endx, float endy, float[]
the fractions specifying the gradient distribution
fractions
,
Color[]
the gradient colors
colors
,
int
either NO_CYCLE, REFLECT, or REPEAT
cycleMethod
)

Constructor for LinearGradientContext.

Method Summary

Modifier and TypeMethod and Description
protected void
fillRaster(int[] pixels, int off, int adjust, int x, int y, int w, int h)

Implements abstract com.sun.prism.impl.paint.MultipleGradientContext.fillRaster.

Return a Raster containing the colors generated for the graphics operation.

Inherited from com.sun.prism.impl.paint.MultipleGradientContext:
indexIntoGradientsArrays

Field Detail

dgdXback to summary
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

dgdYback to summary
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

gcback to summary
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

Constructor Detail

LinearGradientContextback to summary
pack-priv LinearGradientContext(LinearGradient paint, BaseTransform t, float startx, float starty, float endx, float endy, float[] fractions, Color[] colors, int cycleMethod)

Constructor for LinearGradientContext.

Parameters
paint:LinearGradient

the LinearGradientPaint from which this context is created

t:BaseTransform

the AffineTransform from user space into device space (gradientTransform should be concatenated with this)

fractions:float[]

the fractions specifying the gradient distribution

colors:Color[]

the gradient colors

cycleMethod:int

either NO_CYCLE, REFLECT, or REPEAT

Method Detail

fillRasterback to summary
protected void fillRaster(int[] pixels, int off, int adjust, int x, int y, int w, int h)

Implements abstract com.sun.prism.impl.paint.MultipleGradientContext.fillRaster.

Return a Raster containing the colors generated for the graphics operation. This is where the area is filled with colors distributed linearly.

Annotations
@Override