Skip to content

Latest commit

 

History

History
57 lines (47 loc) · 1.51 KB

File metadata and controls

57 lines (47 loc) · 1.51 KB

GetGradientSpotColor

Description

Gets the spot color of the specified gradient segment.

PROCEDURE GetGradientSpotColor(
				gradient     : HANDLE;
				segmentIndex : INTEGER;
				VAR red      : LONGINT;
				VAR green    : LONGINT;
				VAR blue     : LONGINT);
def vs.GetGradientSpotColor(gradient, segmentIndex):
    return (red, green, blue)

Parameters

Name Type Description
gradient HANDLE Gradient that contains the segment.
segmentIndex INTEGER Segment from which to get the data.
red LONGINT Red component of the color spot's color.
green LONGINT Green component of the color spot's color.
blue LONGINT Blue component of the color spot's color.

Examples

VectorScript

GetGradientSpotColor(gradientHandle, 4, red, green, blue);

Python

red, green, blue = vs.GetGradientSpotColor(gradientHandle, 4)
GetGradientSpotColor(gradient, 1, 2, 3, 10);
import vs

# Gets the spot color of the specified gradient segment.
gradient = vs.FSActLayer()  # handle to the first selected object on the active layer
segmentIndex = 1

red, green, blue = vs.GetGradientSpotColor(gradient, segmentIndex)
vs.Message('GetGradientSpotColor returned: ' + str((red, green, blue)))

Version

Availability: from VectorWorks10.0

Category