Graphics.DrawClosedCurve Method (Pen, PointF, Single, FillMode)
Draws a closed cardinal spline defined by an array of PointF structures using a specified tension.
Assembly: System.Drawing (in System.Drawing.dll)
member DrawClosedCurve : pen:Pen * points:PointF * tension:float32 * fillmode:FillMode -> unit
- Type: System.Single
Value greater than or equal to 0.0F that specifies the tension of the curve.
pen is a null reference (Nothing in Visual Basic).
points is a null reference (Nothing in Visual Basic).
This method draws a closed cardinal spline that passes through each point in the array. If the last point does not match the first point, an additional curve segment is added from the last point to the first point to close it.
The array of points must contain at least four PointF structures.
The tension parameter determines the shape of the spline. If the value of the tension parameter is 0.0F, this method draws straight line segments to connect the points. Usually, the tension parameter is less than or equal to 1.0F. Values over 1.0F produce unusual results.
Creates red and green pens.
Creates seven points to define the curve.
Draws seven red straight lines between the seven points to form a polygon.
Creates tension and fill mode settings.
Draws a green closed curve through the seven points.
The method uses a tension of 1.0 and sets the fill mode to FillMode.Alternate.