User Tools

Site Tools


api:dk11:delphi:gisutils.tgis_utils.giscolorramplist

Table of Contents

TGIS_Utils.GisColorRampList property

DK11 for Delphi | GisUtils.TGIS_Utils.GisColorRampList | Methods | Properties

Color ramps list.

Available also on: .NET | Java | ActiveX.

Syntax

// Delphi
public
  property GisColorRampList : TGIS_ColorRampList read;
// C++ Builder
public:
  __property TGIS_ColorRampList* GisColorRampList = {read};

Value

Remarks

See documentation: TGIS_ColorRampList and TGIS_GradientMap

Example

Below are a few pseudo-code examples of how to apply a specified color ramp to a grid layer.

min = grid_layer.MinHeight
max = grid_layer.MaxHeight
 
// Default representation of 'ElevationDark' color ramp
color_ramp = TGIS_Utils.GisColorRampList.ByName('ElevationDark')
color_map = color_ramp.RealizeMap(TGIS_ColorMapMode.Continuous, 0, False )
grid_layer.GenerateRampEx(min, max, color_map, nil)
 
// Discrete representation of 'Accent' color ramp with maximum number of colors
color_ramp = TGIS_Utils.GisColorRampList.ByName('Accent')
color_map = color_ramp.RealizeMap(TGIS_ColorMapMode.Discrete, -1, False )
grid_layer.GenerateRampEx(min, max, color_map, nil)
 
// Reversed continuous representation of 'Spectral' color ramp, get subclass with 3 colors
color_ramp = TGIS_Utils.GisColorRampList.ByName('Spectral')
color_map = color_ramp.RealizeMap(TGIS_ColorMapMode.Continuous, 3, True)
grid_layer.GenerateRampEx(min, max, color_map, nil)
2020/07/01 01:09

Page Tools