Skip to content

Latest commit

 

History

History
48 lines (39 loc) · 1.59 KB

File metadata and controls

48 lines (39 loc) · 1.59 KB

InsertGradientSegment

Description

Inserts a new segment into the gradient and initializes its data to the specified values.

A segment consists of a single color spot and the single midpoint immediately to the right of the color spot.

FUNCTION InsertGradientSegment(
				gradient         : HANDLE;
				spotPosition     : REAL;
				midpointPosition : REAL;
				red              : LONGINT;
				green            : LONGINT;
				blue             : LONGINT): INTEGER;
def vs.InsertGradientSegment(gradient, spotPosition, midpointPosition, red, green, blue):
    return INTEGER

Parameters

Name Type Description
gradient HANDLE Gradient into which a segment is to be inserted.
spotPosition REAL Position of the segment's color spot relative to left-most point of the gradient.
midpointPosition REAL Position of the segment's midpoint relative to color spot immediately to left.
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

index := InsertGradientSegment(gradientHandle, 0.35, 0.4, 255, 255, 255);
{ inserts a white color spot at position, 0.35, with a midpoint position of 0.4 }

Python

Version

Availability: from VectorWorks10.0

Category