# Two.LinearGradient

Extends: Two.Gradient

# Constructor

Argument Description
x1 The x position of the first end point of the linear gradient.
y1 The y position of the first end point of the linear gradient.
x2 The x position of the second end point of the linear gradient.
y2 The y position of the second end point of the linear gradient.
stops A list of Two.Stops that contain the gradient fill pattern for the gradient.

# left

The x and y value for where the first end point is placed on the canvas.

The x and y value for where the second end point is placed on the canvas.

# clone

Returns: Two.Gradient

Argument Description
parent The parent group or scene to add the clone to.

Create a new instance of Two.LinearGradient with the same properties of the current path.

# toObject

Returns: Object

Return a JSON compatible plain object that represents the path.