Add [Color Nodes]
Add creates a new ColorNode at color spectrum position (0.0 to 1.0) between the first and last node of the Colormap. Returns a reference to the added ColorNode object.
Syntax
object. Add( Position )
Parameter |
Type |
Description |
Position |
Double |
required; This indicates the exact position of an additional anchor node along the colormap. Its value should be between 0.0 and 1.0. |
Remarks
Any new color node will be given an index number equal to the total number of nodes -1.
To convert color spectrum positions to data values and data values to spectrum positions, see PosToDat and DatToPos.
Example
This example demonstrates how to create three new nodes.
'Creates a new node at 25% of the total range.
ColorMap.ColorNodes.Add(Position:=0.25)
' Creates a new node halfway between the first
' and last node
ColorMap.ColorNodes.Add(Position:=0.5)
'Creates a new node at a position 1% of the
'total range away from the last node.
ColorMap.ColorNodes.Add(Position:=0.99)
Used by: ColorNodes collection