public class Gradient extends Color
Constructor and Description |
---|
Gradient(double angle)
Creates a linear gradient using the given angle.
|
Gradient(String id,
double angle)
Deprecated.
use
Gradient(double) instead, id is unused and will be removed in a future version |
Modifier and Type | Method and Description |
---|---|
void |
addStop(int offset,
Color color)
Adds a stop to the gradient using the given offset and color.
|
void |
addStop(Stop stop)
Adds the given stop to the gradient.
|
void |
clearStops()
Removes all stops from the gradient.
|
double |
getAngle()
Returns the angle of the gradient.
|
String |
getId()
Deprecated.
the id property is unused and will be removed in a future release
|
List<Stop> |
getStops()
Returns the stops of the gradient.
|
void |
setAngle(double angle)
Sets the angle of the gradient.
|
void |
setId(String id)
Deprecated.
the id property is unused and will be removed in a future release
|
@Deprecated public Gradient(String id, double angle)
Gradient(double)
instead, id is unused and will be removed in a future versionid
- the gradient idangle
- the angle of the gradientpublic Gradient(double angle)
angle
- the angle of the gradientpublic void addStop(int offset, Color color)
offset
- the offset of the stopcolor
- the color of the stoppublic void addStop(Stop stop)
stop
- the stop to be addedpublic void clearStops()
public double getAngle()
@Deprecated public String getId()
public List<Stop> getStops()
public void setAngle(double angle)
angle
- the new angle of the gradient@Deprecated public void setId(String id)
id
- the new id of the gradientCopyright © 2015. All rights reserved.