1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| Path p = new Path();
p.Stroke = new SolidColorBrush(Color.FromArgb(255, 0, 0, 255));
p.StrokeThickness = 1;
foreach (GisSharpBlog.NetTopologySuite.Geometries.Geometry geom in ListGeom)
{
m_figure = new PathFigure();
m_figure.IsClosed = false;
m_figure.IsFilled = false;
m_figure.StartPoint = new System.Windows.Point((geom.Coordinates[0].X - miniX) / ratio, (geom.Coordinates[0].Y - miniY) / ratio);
for(int i = 1 ; i < geom.Coordinates.Count() ; i++ )
{
m_figure.Segments.Add(new System.Windows.Media.LineSegment(new System.Windows.Point((geom.Coordinates[i].X - miniX)/ratio, (geom.Coordinates[i].Y - miniY)/ratio), true));
}
m_listFigures.Add(m_figure);
}
PathGeometry pgeom = new PathGeometry(m_listFigures);
p.Data = pgeom;
Plan.Children.Add(p); |
Partager