public Geometry GetGeometry(Point[] points)
 {
     Point[] arr = new Point[points.Length + 2];
     arr[0] = new Point(points[0].X, 0);
     arr[arr.Length - 1] = new Point(points[points.Length - 1].X, 0);
     for (int i = 0; i < points.Length; i++)
     {
         arr[i + 1] = points[i];
     }
     return(PolyLineGeometryBuilder.CreateGeometry(arr, true));
 }
示例#2
0
        // Make a Bezier curve connecting these points.
        public Geometry GetGeometry(Point[] points)
        {
            if (points.Length < 2)
            {
                return(PolyLineGeometryBuilder.CreateGeometry(points));
            }

            Point[] result_points = MakeCurvePoints(points, this.Tension);

            // Use the points to create the path.
            return(MakeBezierPath(result_points.ToArray()));
        }
        public Geometry GetGeometry(Point[] points)
        {
            PointCollection pc = new PointCollection();

            foreach (var pt in points)
            {
                if (pc.Count > 0)
                {
                    pc.Add(new Point(pt.X, pc[pc.Count - 1].Y));
                }
                pc.Add(pt);
            }

            return(PolyLineGeometryBuilder.CreateGeometry(pc));
        }