---
title: "Mapxtreme2005 两点之间画直线"
author: "seven7680"
date: "2009-03-30T16:04:50Z"
tags: ["F#"]
slug: "mapxtreme2005"
draft: false
lastmod: "2009-03-30T16:04:50Z"
id: 357727
url: "https://seven7680.iteye.com/blog/357727"
---

private void DrawLine(MapInfo.Data.Table temptable,MapInfo.Geometry.DPoint begDpoint,MapInfo.Geometry.DPoint endDpoint,int Pattoner,System.Drawing.Color color)
        {
            MapInfo.Geometry.MultiCurve mc = MapInfo.Geometry.MultiCurve.CreateLine(map.GetDisplayCoordSys(), begDpoint, endDpoint);
            MapInfo.Styles.SimpleLineStyle bl = new MapInfo.Styles.SimpleLineStyle(new MapInfo.Styles.LineWidth(2, MapInfo.Styles.LineWidthUnit.Pixel), Pattoner, color);
            MapInfo.Styles.CompositeStyle cs = new MapInfo.Styles.CompositeStyle(null, bl, null, null);
            MapInfo.Data.Feature f = new Feature(temptable.TableInfo.Columns);
            f.Geometry = mc;
            f.Style = cs;
            temptable.InsertFeature(f);
        } 
