39 * @see java.awt.LinearGradientPaint
40 * @see java.awt.PaintContext
41 * @see java.awt.Paint
42 * @author Nicholas Talian, Vincent Hardy, Jim Graham, Jerry Evans
43 */
44 final class LinearGradientPaintContext extends MultipleGradientPaintContext {
45
46 /**
47 * The following invariants are used to process the gradient value from
48 * a device space coordinate, (X, Y):
49 * g(X, Y) = dgdX*X + dgdY*Y + gc
50 */
51 private float dgdX, dgdY, gc;
52
53 /**
54 * Constructor for LinearGradientPaintContext.
55 *
56 * @param paint the {@code LinearGradientPaint} from which this context
57 * is created
58 * @param cm {@code ColorModel} that receives
59 * the <code>Paint</code> data. This is used only as a hint.
60 * @param deviceBounds the device space bounding box of the
61 * graphics primitive being rendered
62 * @param userBounds the user space bounding box of the
63 * graphics primitive being rendered
64 * @param t the {@code AffineTransform} from user
65 * space into device space (gradientTransform should be
66 * concatenated with this)
67 * @param hints the hints that the context object uses to choose
68 * between rendering alternatives
69 * @param start gradient start point, in user space
70 * @param end gradient end point, in user space
71 * @param fractions the fractions specifying the gradient distribution
72 * @param colors the gradient colors
73 * @param cycleMethod either NO_CYCLE, REFLECT, or REPEAT
74 * @param colorSpace which colorspace to use for interpolation,
75 * either SRGB or LINEAR_RGB
76 */
77 LinearGradientPaintContext(LinearGradientPaint paint,
78 ColorModel cm,
79 Rectangle deviceBounds,
|
39 * @see java.awt.LinearGradientPaint
40 * @see java.awt.PaintContext
41 * @see java.awt.Paint
42 * @author Nicholas Talian, Vincent Hardy, Jim Graham, Jerry Evans
43 */
44 final class LinearGradientPaintContext extends MultipleGradientPaintContext {
45
46 /**
47 * The following invariants are used to process the gradient value from
48 * a device space coordinate, (X, Y):
49 * g(X, Y) = dgdX*X + dgdY*Y + gc
50 */
51 private float dgdX, dgdY, gc;
52
53 /**
54 * Constructor for LinearGradientPaintContext.
55 *
56 * @param paint the {@code LinearGradientPaint} from which this context
57 * is created
58 * @param cm {@code ColorModel} that receives
59 * the {@code Paint} data. This is used only as a hint.
60 * @param deviceBounds the device space bounding box of the
61 * graphics primitive being rendered
62 * @param userBounds the user space bounding box of the
63 * graphics primitive being rendered
64 * @param t the {@code AffineTransform} from user
65 * space into device space (gradientTransform should be
66 * concatenated with this)
67 * @param hints the hints that the context object uses to choose
68 * between rendering alternatives
69 * @param start gradient start point, in user space
70 * @param end gradient end point, in user space
71 * @param fractions the fractions specifying the gradient distribution
72 * @param colors the gradient colors
73 * @param cycleMethod either NO_CYCLE, REFLECT, or REPEAT
74 * @param colorSpace which colorspace to use for interpolation,
75 * either SRGB or LINEAR_RGB
76 */
77 LinearGradientPaintContext(LinearGradientPaint paint,
78 ColorModel cm,
79 Rectangle deviceBounds,
|