Skip to content

Latest commit

 

History

History
40 lines (31 loc) · 950 Bytes

File metadata and controls

40 lines (31 loc) · 950 Bytes

CreateGradient

Description

Creates a new gradient resource.

FUNCTION CreateGradient(name : STRING): HANDLE;
def vs.CreateGradient(name):
    return HANDLE

Parameters

Name Type Description
name STRING A user-specified name by which the newly created gradient will be identified.

Remarks

This function creates a default gradient with 2 color spots: a white color spot at position, 0.0, and a black color spot at position, 1.0. A gradient resource must always have at least 2, but no more than 32767 color spots. NOTE: if the specified name already exists, a unique nmae will be created by adding a number suffix to the specified name.

Examples

==== VectorScript ====

gradientHandle := CreateGradient('My Gradient');

==== Python ====

vs.Message(vs.CreateGradient('My Gradient'))

Version

Availability: from VectorWorks10.0

Category

  • Dialogs - Modern