globalmapper.SetLayerPalette

globalmapper.SetLayerPalette(GM_LayerHandle_t32 aLayer, GM_PaletteEntry_t aNewPalette, int aReserved) GM_Error_t32[source]

Sets the color palette for a given layer. The layer must be a palette-based image. The mPalette and mPaletteSize values in GM_LayerInfo_t for the layer will indicate the size and values in the current palette. You can restore the original palette for a layer by passing None. If you pass in fewer colors than in the original palette, only those colors that you provide will be updated.

Parameters
  • aLayer (GM_LayerHandle_t32) – layer to set palette for

  • aNewPalette (GM_PaletteEntry_t) – pointer to list of palette entries to use for layer or None to reset palette to original palette

  • aReserved (int) – Reserved for future use; must be 0.

Returns

Error Code

Return type

GM_Error_t32