MapWinGIS:AxMap ShapeLayerFillColor

This is a back-up of the WIKI.
Not all links might work
We're working on a new wiki.

Main Page | Recent changes | View source | Page history | Log in / create account |

Printable version | Disclaimers | Privacy policy

ShapeLayerFillColor

Gets or sets the fill color for the specified layer. Only works on polygon shapefiles.


VB.NET Usage

Property set_ShapeLayerFillColor(LayerHandle As Integer, param0 as System.UInt32
)
            Parameters

LayerHandle

Handle of the layer for which the fill color is to be set.

param0

Fill color for the polygon shapefile. This is a System.UInt32 representation of an RGB color.

Property get_ShapeLayerFillColor(LayerHandle As Integer) As System.Drawing.Color             Parameters

LayerHandle

Handle of the layer for which the fill color is required.

Return Value

Fill color for the polygon shapefile.

Sample Code

    Private Function FillColor()
        Dim hnd As Integer
        Dim col As System.UInt32
        Dim col2 As System.Drawing.Color
        Dim R As Integer = 122
        Dim G As Integer = 255
        Dim B As Integer = 109
        'get the handle for the layer at position 0
        hnd = Map1.get_LayerHandle(0)
        'convert an RGB color to a UInt32
        col = System.Convert.ToUInt32(RGB(R, G, B))
        'set the fill color for the shapes in layer 0
        Map1.set_ShapeLayerFillColor(hnd, col)
        'get the fill color for the shapes in layer 0
        col2 = Map1.get_ShapeLayerFillColor(hnd)
    End Function
  

VB 6 Usage

Property ShapeLayerFillColor(LayerHandle As Long) As OLE_COLOR

 
            Parameters
  LayerHandle   Handle of the layer.
  Return Value   Fill color of the layer

Sample Code


    Private Sub FillColor()
        Dim col1 As OLE_COLOR
        Dim col2 As OLE_COLOR
        Dim hnd As Long
        'get an RGB color
        col1 = RGB(104, 209, 255)
        'get the handle of the layer at position 0
        hnd = Map1.LayerHandle(0)
        'set the fill color
        Map1.ShapeLayerFillColor(hnd) = vbRed
        'get the fill color
        col2 = Map1.ShapeLayerFillColor(hnd)
    End Sub

Retrieved from "http://mapwindow.org/wiki/index.php/MapWinGIS:AxMap_ShapeLayerFillColor"

This page has been accessed 1,936 times. This page was last modified on 9 November 2005, at 19:00.