VS:InsertGradientData: Difference between revisions

From Vectorworks Developer
Jump to navigation Jump to search
No edit summary
 
m (1 revision: vw2015)
 
(No difference)

Latest revision as of 14:35, 18 September 2014

.VectorScript|VectorScript ..VS:Function Reference|Function Reference ..VS:Function_Reference_Appendix|Appendix

Description

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

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

Parameters

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.
opacity INTEGER Opacity of the color spot.

Return Value

Returns the index of the newly created segment; 0 otherwise.

Note: segment indexes begin with 1.

Example

index := InsertGradientData(gradientHandle, 0.35, 0.4, 255, 255, 255, 100);
{ inserts a white color spot at position, 0.35, with a midpoint position of 0.4; 100 is max opacity (i.e. opaque) }

Version

Availability: from Vectorworks 2015

See Also

VS Functions:

VS:GetGradientDataN | VS:SetGradientDataN

VS Functions:

[[VS:GetGradientDataN]]

| [[VS:SetGradientDataN]]