public class GradientColor extends Object implements Color
| Modifier and Type | Class and Description |
|---|---|
static class |
GradientColor.LinearGradient |
static class |
GradientColor.RadialGradient |
static class |
GradientColor.Stop |
| Modifier and Type | Method and Description |
|---|---|
void |
addColorStop(double d,
SolidColor color)
Adds a color stop to the gradient
|
static GradientColor |
createLinear(double startX,
double startY,
double endX,
double endY)
Creates a new linear gradient between two given points.
|
static GradientColor |
createRadial(double centerX,
double centerY,
double radius)
Creates a radial gradient color at a specified point with the given
radius.
|
GradientColor.LinearGradient |
getLinearGradient() |
GradientColor.RadialGradient |
getRadialGradient() |
List<GradientColor.Stop> |
getStops() |
public GradientColor.LinearGradient getLinearGradient()
public GradientColor.RadialGradient getRadialGradient()
public List<GradientColor.Stop> getStops()
public void addColorStop(double d,
SolidColor color)
d - The relative point of the color stop, between 0 and 1color - The color at the point defined by dpublic static GradientColor createLinear(double startX, double startY, double endX, double endY)
addColorStop(double, SolidColor) to define the colors.startX - The relative start point on the X-axis, 0..1startY - The relative start point on the Y-axis, 0..1endX - The relative end point on the X-axis, 0..1endY - The relative end point on the Y-axis, 0..1public static GradientColor createRadial(double centerX, double centerY, double radius)
addColorStop(double, SolidColor) to define the
colors.centerX - The X coordinate of the centercenterY - The Y coordinate of the centerradius - The radiusCopyright © 2021. All rights reserved.