Skip to content

Latest commit

 

History

History
59 lines (52 loc) · 1.69 KB

File metadata and controls

59 lines (52 loc) · 1.69 KB

GetGradientDataN

PROCEDURE GetGradientDataN(
				gradient             : HANDLE;
				segmentIndex         : INTEGER;
				VAR spotPosition     : REAL;
				VAR midpointPosition : REAL;
				VAR red              : LONGINT;
				VAR green            : LONGINT;
				VAR blue             : LONGINT;
				VAR opacity          : INTEGER);
def vs.GetGradientDataN(gradient, segmentIndex):
    return (Boolean, spotPosition, midpointPosition, red, green, blue, opacity)

Parameters

Name Type Description
gradient HANDLE Gradient that contains the segment.
segmentIndex INTEGER Segment from which to get the data.
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.
opacity INTEGER Opacity of the color spot.

Examples

PROCEDURE Example;
VAR
gradient :HANDLE;
segmentIndex :INTEGER;
spotPosition, midpointPosition :REAL;
red, green, blue :LONGINT;
opacity :INTEGER
BEGIN
gradient := GetObject('Cyan-Magenta-Yellow');
segmentIndex := 3;
GetGradientData(gradient, segmentIndex, spotPosition, midpointPosition, red, green, blue.opacity);
Message(red, ' ', green, ' ', blue, ' ', opacity);
END;
RUN(Example);

See Also

VS Functions: SetGradientDataN | InsertGradientData

Version

Availability: from Vectorworks 2015

Category