Sg 2.9
GradientColor
Packages RSS
About
News
Gallery
Scripts
Tutorials
Download
Reference
Forum
Users
License
Twitter

Extends Color

Constructors

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

Operators

    Returns:
  • Boolean

Properties

The origin point of the gradient.

The destination point of the gradient.

The hilite of the gradient. The hilite is only visible in radial gradients and allows you to move the center of the gradient while leaving the boundaries of the gradient alone.

Inheritance

AltStyle によって変換されたページ (->オリジナル) /