Пример #1
0
        public static PolyLineSegment CreatePolylineSegment(IList <Point> points, int start, int count,
                                                            bool isStroked = true)
        {
            if (count < 0 || points.Count < start + count)
            {
                throw new ArgumentOutOfRangeException(nameof(count));
            }
            var segment = new PolyLineSegment
            {
                Points = new PointCollection()
            };

            for (var i = 0; i < count; i++)
            {
                segment.Points.Add(points[start + i]);
            }
            segment.SetIsStroked(isStroked);
            return(segment);
        }