The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information.... |
Home BasePack SDLColors Class TColorArray Methods FillByInterpolation | |||||||||||||
See also: ColorElem, LoadFromFile, Color Arrays, Fill (ColorArray) | |||||||||||||
FillByInterpolation |
|||||||||||||
The method FillByInterpolation allows to generate an array of colors. The basic idea is to use n pivot colors which are regularly spaced across the entire array (the first pivot color is always at index 1, the last is always the last color of the array). The colors between the pivot colors are calculated by linear interpolation. The parameter Colors is an open array of any number of pivot colors which are to be used for the calculation of the color array. The parameter DiscreteLevels determines how many color shades are generated. Setting DiscreteLevels to zero generates continuous colors, any positive value results in the corresponding number of shades. This can be used to generate color scales typically used in geographic maps. The following image shows the effect of the parameter DiscreteLevels.
|