# 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.

# fromObject

Returns: Two.LinearGradient

Argument Description
obj Object notation of a Two.LinearGradient to create a new instance

Create a new Two.LinearGradient from an object notation of a Two.LinearGradient.

nota-bene

Works in conjunction with Two.LinearGradient.toObject

# 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.

# copy

Argument Description
gradient The reference Two.LinearGradient

Copy the properties of one Two.LinearGradient onto another.

# 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.