private GraphicsPath ToGraphicsPath(CodeCell.AgileMap.Core.Feature feature, ICanvas canvas) { CodeCell.AgileMap.Core.ShapePolyline ply = feature.Geometry as CodeCell.AgileMap.Core.ShapePolyline; GeoDo.RSS.Core.DrawEngine.ICoordinateTransform tran = canvas.CoordTransform; double prjX, prjY; int screenX, screenY; GraphicsPath path = new GraphicsPath(); foreach (CodeCell.AgileMap.Core.ShapeLineString line in ply.Parts) { PointF[] pts = new PointF[line.Points.Length]; for (int i = 0; i < pts.Length; i++) { if (!feature.Projected) { tran.Geo2Prj(line.Points[i].X, line.Points[i].Y, out prjX, out prjY); } else { prjX = line.Points[i].X; prjY = line.Points[i].Y; } tran.Prj2Screen(prjX, prjY, out screenX, out screenY); pts[i].X = screenX; pts[i].Y = screenY; } path.AddCurve(pts.ToArray()); //path.AddLines(); path.StartFigure(); } return(path); }
public static ListViewItem ToListViewItem(this CodeCell.AgileMap.Core.Feature fet) { string[] values = fet.FieldValues; if (values == null || values.Length == 0) { return(null); } ListViewItem it = new ListViewItem(values[0]); for (int i = 1; i < values.Length; i++) { it.SubItems.Add(values[i]); } return(it); }
public void RemoveFeature(CodeCell.AgileMap.Core.Feature feature) { _vecthorHost.RemoveFeature(feature.OID); }
public void AddFeature(CodeCell.AgileMap.Core.Feature feature) { _vecthorHost.Add(new SimpleVectorObject(feature.FieldValues, feature.Geometry)); }
internal void AddFeature(CodeCell.AgileMap.Core.Feature feature) { _geoItems.Add(feature); }