Quantcast
Channel: MapWinGIS ActiveX Map and GIS Component
Viewing all articles
Browse latest Browse all 2341

New Post: Draw Lines with coordinates

$
0
0
Hello @ Paul,

How do I draw a set of graphic lines with equal spacing e.g. dx for every line drawn?

I have this code for drawing the line but I don't know how to make it graphic and also add the spacing

void DrawLine( double x1, double y1, double x2, double y2, int pixelWidth, Color color)
{
//Set point 1 as x = 100, y = 100
x1 = 50
y1 = 50
'Set point2 as x = 500, y = 500
x2 = 100
y2 = 100
//Set pixel width for the line as 1
width = 1
//Set the color for the line as green
col = RGB(0, 255, 0)
//Create new drawing layer on map
draw_hndl = Map1.NewDrawing(MapWinGIS.tkDrawReferenceList.dlScreenReferencedList)
'Draw green line from point 1 to point 2
Map1.DrawLine x1, y1, x2, y2, width, col
}

Viewing all articles
Browse latest Browse all 2341

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>