MapWinGIS:AxMap ShapePointColor

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

ShapePointColor

Gets or sets the point color for the specified shape. Only works on shapefiles.
See also http://svn.mapwindow.org/svnroot/TestingScripts/TestShapeFillColor.cs


VB.NET Usage

Property set_ShapePointColor(LayerHandle As Integer, Shape As Integer, param0 as System.UInt32
)

            Parameters

LayerHandle

Handle of the layer containing the shape for which the point color is to be set.
Shape Handle of the shape for which the point color is to be set.

param0

Point color for the shape in the polygon shapefile. This is a System.UInt32 representation of an RGB color.

Property get_ShapePointColor(LayerHandle As Integer, Shape As Integer) As System.Drawing.Color
            Parameters

LayerHandle

Handle of the layer containing the shape for which the point color is required.
Shape Handle of the shape for which the point color is required.

Return Value

Point color for the shape in the polygon shapefile.

Sample Code

    Private Function PointColor()
        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 point color for shape 0 in the layer
        Map1.set_ShapePointColor(hnd, 0, col)
        'get the point color for shape 0 in the layer
        col2 = Map1.get_ShapePointColor(hnd, 0)
    End Function
  

VB 6 Usage

Property ShapePointColor(LayerHandle As Long, Shape As Long) As OLE_COLOR
.

            Parameters

LayerHandle Handle of the layer.
Shape Handle of the shape.
Return Value Point color for the shape.

Sample Code

    Private Function PointColor()
        Dim hnd As Long
        Dim col As OLE_COLOR
        Dim col2 As OLE_COLOR
        'get the handle for the layer at position 0
        hnd = Map1.LayerHandle(0)
        'get RGB color
        col = RGB(103, 53, 244)
        'set the point color for shape 0 in the layer
        Map1.ShapePointColor(hnd, 0) = col
        'get the point color for shape 0 in the layer
        col2 = Map1.ShapePointColor(hnd, 0)
    End Function

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

This page has been accessed 1,803 times. This page was last modified on 19 April 2010, at 09:37.