Creates a GradientColor object.
Sample code:
// a radial gradient from white to black
var gradient = new Gradient() {
type: 'radial',
stops: [
new GradientStop(new GrayColor(0), 0),
new GradientStop(new GrayColor(1), 1)
};
var origin = new Point(0, 0);
var destination = new Point(0, 100);
var gradientColor = new GradientColor(gradient, origin, destination);
// create a circle filled with the gradient color
var circle = new Path.Circle(new Point(0, 0), 100) {
fillColor: gradientColor
};
Parameters:- gradient: Gradient — the gradient
- origin: Point — the origin point
- destination: Point — the destination point
- hilite: Point — the hilite point (only for radial gradients) — optional
- matrix: Matrix — the tranformation matrix — optional