StreamGeometry geom = new StreamGeometry(); //this method fills the StreamGeometry with a polyline DrawLines(geom, polyObj); PathGeometry pathGeometry = geom.GetWidenedPathGeometry(new Pen(Brushes.Black, 10)); GeometryDrawing geoDrawing = new GeometryDrawing(); geoDrawing.Geometry = pathGeometry; Path myPath = new Path(); myPath.Fill = Brushes.LightGreen; myPath.Stroke = Brushes.Black; myPath.StrokeThickness = 0.4; myPath.Name = "tratta"+tratta.id; myPath.Data = pathGeometry; myPath.StrokeLineJoin = System.Windows.Media.PenLineJoin.Round; canvas.Children.Add(myPath);
canvasGeomentry.Child.Add(new Polyline()) { Points=new PointCollection(new List(point)) { new Point (x1,y1), new Point(x2,y2); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)