Two.RadialGradient

Extends: Two.Gradient

Constructor

ArgumentDescription
xThe x position of the origin of the radial gradient.
yThe y position of the origin of the radial gradient.
radiusThe radius of the radial gradient.
stopsA list of Two.Stops that contain the gradient fill pattern for the gradient.
focalXThe x position of the focal point on the radial gradient.
focalYThe y position of the focal point on the radial gradient.

fromObject

Returns: Two.RadialGradient

ArgumentDescription
objObject notation of a Two.RadialGradient to create a new instance

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

nota-bene

Works in conjunction with Two.RadialGradient.toObject

center

The x and y value for where the origin of the radial gradient is.

focal

The x and y value for where the focal point of the radial gradient is.

nota-bene

This effects the spray or spread of the radial gradient.

copy

ArgumentDescription
gradientThe reference Two.RadialGradient

Copy the properties of one Two.RadialGradient onto another.

clone

Returns: Two.RadialGradient

ArgumentDescription
parentThe parent group or scene to add the clone to.

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

toObject

Returns: Object

Return a JSON compatible plain object that represents the path.