public void DrawCurve(Pen pen, PointF[] points, int offset, int numberOfSegments, float tension = 0.5f) { if (points == null) { throw new ArgumentNullException("points"); } if (pen == null) { throw new ArgumentNullException("pen"); } if (numberOfSegments < 1) { throw new ArgumentException("numberOfSegments"); } int count = points.Length; // we need 3 points for the first curve, 2 more for each curves // and it's possible to use a point prior to the offset (to calculate) if (offset == 0 && numberOfSegments == 1 && count < 3) { throw new ArgumentException("invalid parameters"); } if (numberOfSegments >= points.Length - offset) { throw new ArgumentException("offset"); } var tangents = GraphicsPath.OpenCurveTangents(GraphicsPath.CURVE_MIN_TERMS, points, count, tension); MakeCurve(points, tangents, offset, numberOfSegments, CurveType.Open); StrokePen(pen); }