SetNodes

 

The SetNodes method sets the node positions and colors for a color spectrum file.

 

Syntax

object.SetNodes( Positions, Colors )

 

Parameter

Type

Description

Positions

Array of Doubles

required; node positions from 0.0 to 1.0

Colors

Array of Longs

required; node colors

 

Remarks

The first element in the Positions array must equal zero, and the last element must equal 1.0. Positions and Colors must have the same number of elements (at least two). VB users can use ReDim to set the array size to the used size if necessary or you can use SetVertices2.

 

Example

This example demonstrates how to create a custom color spectrum file.

 

Dim Positions(6) As Double

Positions(0)=0.0

Positions(1)=0.1

Positions(2)=0.25

Positions(3)=0.5

Positions(4)=0.75

Positions(5)=0.9

Positions(6)=1.0

 

Dim Colors(6) As Long

Colors(0)= mvColorBlack

Colors(1)=mvColorBlue

Colors(2)=mvColorGreen

Colors(3)= mvColorYellow

Colors(4)= mvColorOrange

Colors(5)=mvColorRed

Colors(6)= mvColorWhite

 

ColorSpectrum.SetNodes(Positions:=Positions, Colors:=Colors)

 

Used by: ColorSpectrum object