DK for Delphi | GisTypesUI.TGIS_ColorMapMode | Enums
Defines colormap mode.
// Delphi type TGIS_ColorMapMode = ( Continuous, Discrete );
// C++ Builder enum DECLSPEC_DENUM TGIS_ColorMapMode unsigned short { Continuous, Discrete };
| Name | Value | Description | |
|---|---|---|---|
| Continuous | Continuous colormap. | ||
| Discrete | Discrete colormap. | ||
Below are a few examples of how to apply a specified color ramp to a grid layer.
// pseudocode min_value = grid_layer.MinHeight max_value = grid_layer.MaxHeight // default representation of 'ElevationDark' color ramp color_ramp = TGIS_Utils.GisColorRampList.ByName(TGIS_ColorRampNames.ElevationDark) color_map = color_ramp.RealizeColorMap(TGIS_ColorMapMode.Continuous, 0, false ) grid_layer.GenerateRampEx(min_value, max_value, color_map, nil) // discrete representation of 'Accent' color ramp with maximum number of colors color_ramp = TGIS_Utils.GisColorRampList.ByName(TGIS_ColorRampNames.Accent) color_map = color_ramp.RealizeColorMap(TGIS_ColorMapMode.Discrete, -1, false) grid_layer.GenerateRampEx(min_value, max_value, color_map, nil) // reversed continuous representation of 'Spectral' color ramp, get subclass with 3 colors color_ramp = TGIS_Utils.GisColorRampList.ByName(TGIS_ColorRampNames.Spectral) color_map = color_ramp.RealizeColorMap(TGIS_ColorMapMode.Continuous, 3, true) grid_layer.GenerateRampEx(min_value, max_value, color_map, nil)