public class LinearGradient extends Gradient
ColorReference defining a linear gradient with one or more changes
between colors.| Modifier and Type | Class and Description |
|---|---|
static class |
LinearGradient.GradientDirection |
| Constructor and Description |
|---|
LinearGradient(LinearGradient.GradientDirection direction)
Constructs a linear gradient with a predefined direction.
|
LinearGradient(Number x1,
Number y1,
Number x2,
Number y2)
Constructs a linear gradient with a custom direction.
|
| Modifier and Type | Method and Description |
|---|---|
protected ColorReference |
copy() |
List<Number> |
getLinearGradient() |
addStop, addStopsInternal, brighten, getStopsgetBrightness, isNull, setBrightnesspublic LinearGradient(LinearGradient.GradientDirection direction)
direction - the direction of the gradient.public LinearGradient(Number x1, Number y1, Number x2, Number y2)
x1 - x-axis percentage of the starting point of the gradient. Must be a
value between 0 and 1.y1 - y-axis percentage of the starting point of the gradient. Must be a
value between 0 and 1.x2 - x-axis percentage of the ending point of the gradient. Must be a
value between 0 and 1.y2 - y-axis percentage of the ending point of the gradient. Must be a
value between 0 and 1.protected ColorReference copy()
copy in class ColorReferenceCopyright © 2013. All Rights Reserved.