Example #1
0
        private static ESRI.ArcGIS.Geometry.IPointCollection PathToPoint(System.Drawing.PointF[] arrPoints)
        {
            ESRI.ArcGIS.Geometry.IPointCollection pointColl = new ESRI.ArcGIS.Geometry.MultipointClass();
            ESRI.ArcGIS.Geometry.IPoint           point     = new ESRI.ArcGIS.Geometry.PointClass();

            foreach (System.Drawing.PointF pointf in arrPoints)
            {
                // switching coords - ESRI and Microsoft use a different 'paper space'.
                point.X = pointf.Y;
                point.Y = pointf.X;

                pointColl.AddPoint(point);
                point = new ESRI.ArcGIS.Geometry.PointClass();
            }

            return(pointColl);
        }