MapWinGIS:AxMap SetImageLayerColorScheme
From MapWindow GIS
SetImageLayerColorScheme
Sets a coloring scheme to be associated with an image layer. The coloring scheme is for reference purposes only
and has no effect the coloring or display of the image.
VB.NET Usage
Function SetImageLayerColorScheme(LayerHandle As Integer, ColorScheme As Object) As Boolean
Parameters
|
LayerHandle | The handle of the image layer to attach the coloring scheme to. |
| ColorScheme | The coloring scheme to attatch to the specified image layer. |
| ReturnValue | Boolean value representing success when true, failure when false. |
Sample Code
Private Sub ImageLayerColoringScheme()
Dim hndl As Integer
Dim scheme As New MapWinGIS.GridColorScheme()
Dim break As New MapWinGIS.GridColorBreak()
'Create color break
break.Caption = "forest"
break.HighColor = System.Convert.ToUInt32(RGB(0, 255, 0))
break.LowColor = System.Convert.ToUInt32(RGB(0, 255, 0))
break.LowValue = 0
break.HighValue = 0
'Add color break to coloring scheme
scheme.InsertBreak(break)
'Get handle for layer 0
hndl = Map1.get_LayerHandle(0)
'set the coloring scheme for this layer
Map1.SetImageLayerColorScheme(hndl, scheme)
End Sub
VB 6 Usage
Function SetImageLayerColorScheme(LayerHandle As Long, ColorScheme As Object) As Boolean
Parameters
|
LayerHandle | The handle of the image layer to attach the coloring scheme to. |
| ColorScheme | The coloring scheme to attatch to the specified image layer. |
| ReturnValue | Boolean value representing success when true, failure when false. |
Sample Code
Private Sub ImageLayerColoringScheme()
Dim hndl As Long
Dim success As Boolean
Dim scheme As New MapWinGIS.GridColorScheme
Dim break As New MapWinGIS.GridColorBreak
'Create color break
break.Caption = "forest"
break.HighColor = RGB(0, 255, 0)
break.LowColor = RGB(0, 255, 0)
break.LowValue = 0
break.HighValue = 0
'Add color break to coloring scheme
scheme.InsertBreak (break)
'Get handle for layer 0
hndl = Map1.LayerHandle(0)
'set the coloring scheme for this layer
success = Map1.SetImageLayerColorScheme(hndl, scheme)
End Sub
















