Graphics.DrawClosedCurve Graphics.DrawClosedCurve Graphics.DrawClosedCurve Method

정의

Point 구조체의 배열에 의해 정의되는 닫힌 카디널 스플라인을 그립니다.Draws a closed cardinal spline defined by an array of Point structures.

오버로드

DrawClosedCurve(Pen, Point[], Single, FillMode) DrawClosedCurve(Pen, Point[], Single, FillMode) DrawClosedCurve(Pen, Point[], Single, FillMode)

지정된 장력을 사용하여 Point 구조체의 배열에 의해 정의되는 닫힌 카디널 스플라인을 그립니다.Draws a closed cardinal spline defined by an array of Point structures using a specified tension.

DrawClosedCurve(Pen, PointF[], Single, FillMode) DrawClosedCurve(Pen, PointF[], Single, FillMode) DrawClosedCurve(Pen, PointF[], Single, FillMode)

지정된 장력을 사용하여 PointF 구조체의 배열에 의해 정의되는 닫힌 카디널 스플라인을 그립니다.Draws a closed cardinal spline defined by an array of PointF structures using a specified tension.

DrawClosedCurve(Pen, Point[]) DrawClosedCurve(Pen, Point[]) DrawClosedCurve(Pen, Point[])

Point 구조체의 배열에 의해 정의되는 닫힌 카디널 스플라인을 그립니다.Draws a closed cardinal spline defined by an array of Point structures.

DrawClosedCurve(Pen, PointF[]) DrawClosedCurve(Pen, PointF[]) DrawClosedCurve(Pen, PointF[])

PointF 구조체의 배열에 의해 정의되는 닫힌 카디널 스플라인을 그립니다.Draws a closed cardinal spline defined by an array of PointF structures.

DrawClosedCurve(Pen, Point[], Single, FillMode) DrawClosedCurve(Pen, Point[], Single, FillMode) DrawClosedCurve(Pen, Point[], Single, FillMode)

지정된 장력을 사용하여 Point 구조체의 배열에 의해 정의되는 닫힌 카디널 스플라인을 그립니다.Draws a closed cardinal spline defined by an array of Point structures using a specified tension.

public:
 void DrawClosedCurve(System::Drawing::Pen ^ pen, cli::array <System::Drawing::Point> ^ points, float tension, System::Drawing::Drawing2D::FillMode fillmode);
public void DrawClosedCurve (System.Drawing.Pen pen, System.Drawing.Point[] points, float tension, System.Drawing.Drawing2D.FillMode fillmode);
member this.DrawClosedCurve : System.Drawing.Pen * System.Drawing.Point[] * single * System.Drawing.Drawing2D.FillMode -> unit

매개 변수

pen
Pen Pen Pen

곡선의 색, 너비 및 높이를 결정하는 Pen입니다.Pen that determines the color, width, and height of the curve.

points
Point[]

스플라인을 정의하는 Point 구조체의 배열입니다.Array of Point structures that define the spline.

tension
Single Single Single

곡선의 장력을 지정하는 0.0F 보다 크거나 같은 값입니다.Value greater than or equal to 0.0F that specifies the tension of the curve.

fillmode
FillMode FillMode FillMode

곡선이 채워지는 방법을 결정하는 FillMode 열거형의 멤버입니다.Member of the FillMode enumeration that determines how the curve is filled. 이 매개 변수는 필수이지만 무시됩니다.This parameter is required but ignored.

예외

pennull입니다.pen is null.

또는-or- pointsnull인 경우points is null.

예제

다음 코드 예제는 Windows Forms에서 사용 하도록 설계 되었으며 필요 PaintEventArgs e의 매개 변수는 Paint 이벤트 처리기입니다.The following code example is designed for use with Windows Forms, and it requires PaintEventArgse, which is a parameter of the Paint event handler. 이 코드에서는 다음 작업을 수행합니다.The code performs the following actions:

  • 빨간색 및 녹색 펜을 만듭니다.Creates red and green pens.

  • 7 개의 점이 곡선을 만듭니다.Creates seven points to define the curve.

  • 다각형을 7 개의 점이 간의 7 빨간색 직선을 그립니다.Draws seven red straight lines between the seven points to form a polygon.

  • 장력을 채우기 모드 설정을 만듭니다.Creates tension and fill mode settings.

  • 7 개의 점이 녹색 닫힌된 곡선을 그립니다.Draws a green closed curve through the seven points.

1.0의 장력을 사용 하 여 메서드와 채우기 모드를 설정 FillMode.Alternate합니다.The method uses a tension of 1.0 and sets the fill mode to FillMode.Alternate.

private:
   void DrawClosedCurvePointTension( PaintEventArgs^ e )
   {
      // Create pens.
      Pen^ redPen = gcnew Pen( Color::Red,3.0f );
      Pen^ greenPen = gcnew Pen( Color::Green,3.0f );

      // Create points that define curve.
      Point point1 = Point(50,50);
      Point point2 = Point(100,25);
      Point point3 = Point(200,5);
      Point point4 = Point(250,50);
      Point point5 = Point(300,100);
      Point point6 = Point(350,200);
      Point point7 = Point(250,250);
      array<Point>^ curvePoints = {point1,point2,point3,point4,point5,point6,point7};

      // Draw lines between original points to screen.
      e->Graphics->DrawLines( redPen, curvePoints );

      // Create tension and fill mode.
      float tension = 1.0F;
      FillMode aFillMode = FillMode::Alternate;

      // Draw closed curve to screen.
      e->Graphics->DrawClosedCurve( greenPen, curvePoints, tension, aFillMode );
   }
private void DrawClosedCurvePointTension(PaintEventArgs e)
{

    // Create pens.
    Pen redPen = new Pen(Color.Red, 3);
    Pen greenPen = new Pen(Color.Green, 3);

    // Create points that define curve.
    Point point1 = new Point(50, 50);
    Point point2 = new Point(100, 25);
    Point point3 = new Point(200, 5);
    Point point4 = new Point(250, 50);
    Point point5 = new Point(300, 100);
    Point point6 = new Point(350, 200);
    Point point7 = new Point(250, 250);
    Point[] curvePoints = {point1, point2, point3, point4, point5, point6, point7};

    // Draw lines between original points to screen.
    e.Graphics.DrawLines(redPen, curvePoints);

    // Create tension and fill mode.
    float tension = 1.0F;
    FillMode aFillMode = FillMode.Alternate;

    // Draw closed curve to screen.
    e.Graphics.DrawClosedCurve(greenPen, curvePoints, tension, aFillMode);
}
Private Sub DrawClosedCurvePointTension(ByVal e As PaintEventArgs)

    ' Create pens.
    Dim redPen As New Pen(Color.Red, 3)
    Dim greenPen As New Pen(Color.Green, 3)

    ' Create points that define curve.
    Dim point1 As New Point(50, 50)
    Dim point2 As New Point(100, 25)
    Dim point3 As New Point(200, 5)
    Dim point4 As New Point(250, 50)
    Dim point5 As New Point(300, 100)
    Dim point6 As New Point(350, 200)
    Dim point7 As New Point(250, 250)
    Dim curvePoints As Point() = {point1, point2, point3, point4, _
    point5, point6, point7}

    ' Draw lines between original points to screen.
    e.Graphics.DrawLines(redPen, curvePoints)

    ' Create tension and fill mode.
    Dim tension As Single = 1.0F
    Dim aFillMode As FillMode = FillMode.Alternate

    ' Draw closed curve to screen.
    e.Graphics.DrawClosedCurve(greenPen, curvePoints, tension, _
    aFillMode)
End Sub

설명

이 메서드는 배열의 각 요소를 통과 하는 폐쇄형된 카디널 스플라인을 그립니다.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.

점 배열에 4 개 이상 있어야 Point 구조입니다.The array of points must contain at least four Point structures.

tension 매개 변수는 스플라인의 모양을 결정 합니다.The tension parameter determines the shape of the spline. 경우 값은 tension 매개 변수는 0.0F,이 메서드는 요소를 연결 하려면 직선 세그먼트를 그립니다.If the value of the tension parameter is 0.0F, this method draws straight line segments to connect the points. 일반적으로 tension 매개 변수 보다 작거나 1.0F로는 합니다.Usually, the tension parameter is less than or equal to 1.0F. 1.0F 값 이상한 결과 생성합니다.Values over 1.0F produce unusual results.

DrawClosedCurve(Pen, PointF[], Single, FillMode) DrawClosedCurve(Pen, PointF[], Single, FillMode) DrawClosedCurve(Pen, PointF[], Single, FillMode)

지정된 장력을 사용하여 PointF 구조체의 배열에 의해 정의되는 닫힌 카디널 스플라인을 그립니다.Draws a closed cardinal spline defined by an array of PointF structures using a specified tension.

public:
 void DrawClosedCurve(System::Drawing::Pen ^ pen, cli::array <System::Drawing::PointF> ^ points, float tension, System::Drawing::Drawing2D::FillMode fillmode);
public void DrawClosedCurve (System.Drawing.Pen pen, System.Drawing.PointF[] points, float tension, System.Drawing.Drawing2D.FillMode fillmode);
member this.DrawClosedCurve : System.Drawing.Pen * System.Drawing.PointF[] * single * System.Drawing.Drawing2D.FillMode -> unit

매개 변수

pen
Pen Pen Pen

곡선의 색, 너비 및 높이를 결정하는 Pen입니다.Pen that determines the color, width, and height of the curve.

points
PointF[]

스플라인을 정의하는 PointF 구조체의 배열입니다.Array of PointF structures that define the spline.

tension
Single Single Single

곡선의 장력을 지정하는 0.0F 보다 크거나 같은 값입니다.Value greater than or equal to 0.0F that specifies the tension of the curve.

fillmode
FillMode FillMode FillMode

곡선이 채워지는 방법을 결정하는 FillMode 열거형의 멤버입니다.Member of the FillMode enumeration that determines how the curve is filled. 이 매개 변수는 필수이지만 무시됩니다.This parameter is required but is ignored.

예외

pennull입니다.pen is null.

또는-or- pointsnull인 경우points is null.

예제

다음 코드 예제는 Windows Forms에서 사용 하도록 설계 되었으며 필요 PaintEventArgs e의 매개 변수는 Paint 이벤트 처리기입니다.The following code example is designed for use with Windows Forms, and it requires PaintEventArgse, which is a parameter of the Paint event handler. 이 코드에서는 다음 작업을 수행합니다.The code performs the following actions:

  • 빨간색 및 녹색 펜을 만듭니다.Creates red and green pens.

  • 7 개의 점이 곡선을 만듭니다.Creates seven points to define the curve.

  • 다각형을 7 개의 점이 간의 7 빨간색 직선을 그립니다.Draws seven red straight lines between the seven points to form a polygon.

  • 장력을 채우기 모드 설정을 만듭니다.Creates tension and fill mode settings.

  • 7 개의 점이 녹색 닫힌된 곡선을 그립니다.Draws a green closed curve through the seven points.

1.0의 장력을 사용 하 여 메서드와 채우기 모드를 설정 FillMode.Alternate합니다.The method uses a tension of 1.0 and sets the fill mode to FillMode.Alternate.

private:
   void DrawClosedCurvePointFTension( PaintEventArgs^ e )
   {
      // Create pens.
      Pen^ redPen = gcnew Pen( Color::Red,3.0f );
      Pen^ greenPen = gcnew Pen( Color::Green,3.0f );

      // Create points that define curve.
      PointF point1 = PointF(50.0F,50.0F);
      PointF point2 = PointF(100.0F,25.0F);
      PointF point3 = PointF(200.0F,5.0F);
      PointF point4 = PointF(250.0F,50.0F);
      PointF point5 = PointF(300.0F,100.0F);
      PointF point6 = PointF(350.0F,200.0F);
      PointF point7 = PointF(250.0F,250.0F);
      array<PointF>^ curvePoints = {point1,point2,point3,point4,point5,point6,point7};

      // Draw lines between original points to screen.
      e->Graphics->DrawLines( redPen, curvePoints );

      // Create tension and fill mode.
      float tension = 1.0F;
      FillMode aFillMode = FillMode::Alternate;

      // Draw closed curve to screen.
      e->Graphics->DrawClosedCurve( greenPen, curvePoints, tension, aFillMode );
   }
private void DrawClosedCurvePointFTension(PaintEventArgs e)
{

    // Create pens.
    Pen redPen = new Pen(Color.Red, 3);
    Pen greenPen = new Pen(Color.Green, 3);

    // Create points that define curve.
    PointF point1 = new PointF(50.0F, 50.0F);
    PointF point2 = new PointF(100.0F, 25.0F);
    PointF point3 = new PointF(200.0F, 5.0F);
    PointF point4 = new PointF(250.0F, 50.0F);
    PointF point5 = new PointF(300.0F, 100.0F);
    PointF point6 = new PointF(350.0F, 200.0F);
    PointF point7 = new PointF(250.0F, 250.0F);
    PointF[] curvePoints = {point1, point2, point3, point4, point5, point6, point7};

    // Draw lines between original points to screen.
    e.Graphics.DrawLines(redPen, curvePoints);

    // Create tension and fill mode.
    float tension = 1.0F;
    FillMode aFillMode = FillMode.Alternate;

    // Draw closed curve to screen.
    e.Graphics.DrawClosedCurve(greenPen, curvePoints, tension, aFillMode);
}
Private Sub DrawClosedCurvePointFTension(ByVal e As PaintEventArgs)

    ' Create pens.
    Dim redPen As New Pen(Color.Red, 3)
    Dim greenPen As New Pen(Color.Green, 3)

    ' Create points that define curve.
    Dim point1 As New PointF(50.0F, 50.0F)
    Dim point2 As New PointF(100.0F, 25.0F)
    Dim point3 As New PointF(200.0F, 5.0F)
    Dim point4 As New PointF(250.0F, 50.0F)
    Dim point5 As New PointF(300.0F, 100.0F)
    Dim point6 As New PointF(350.0F, 200.0F)
    Dim point7 As New PointF(250.0F, 250.0F)
    Dim curvePoints As PointF() = {point1, point2, point3, point4, _
    point5, point6, point7}

    ' Draw lines between original points to screen.
    e.Graphics.DrawLines(redPen, curvePoints)

    ' Create tension and fill mode.
    Dim tension As Single = 1.0F
    Dim aFillMode As FillMode = FillMode.Alternate

    ' Draw closed curve to screen.
    e.Graphics.DrawClosedCurve(greenPen, curvePoints, tension, _
    aFillMode)
End Sub

설명

이 메서드는 배열의 각 요소를 통과 하는 폐쇄형된 카디널 스플라인을 그립니다.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.

점 배열에 4 개 이상 있어야 PointF 구조입니다.The array of points must contain at least four PointF structures.

tension 매개 변수는 스플라인의 모양을 결정 합니다.The tension parameter determines the shape of the spline. 경우 값은 tension 매개 변수는 0.0F,이 메서드는 요소를 연결 하려면 직선 세그먼트를 그립니다.If the value of the tension parameter is 0.0F, this method draws straight line segments to connect the points. 일반적으로 tension 매개 변수 보다 작거나 1.0F로는 합니다.Usually, the tension parameter is less than or equal to 1.0F. 1.0F 값 이상한 결과 생성합니다.Values over 1.0F produce unusual results.

DrawClosedCurve(Pen, Point[]) DrawClosedCurve(Pen, Point[]) DrawClosedCurve(Pen, Point[])

Point 구조체의 배열에 의해 정의되는 닫힌 카디널 스플라인을 그립니다.Draws a closed cardinal spline defined by an array of Point structures.

public:
 void DrawClosedCurve(System::Drawing::Pen ^ pen, cli::array <System::Drawing::Point> ^ points);
public void DrawClosedCurve (System.Drawing.Pen pen, System.Drawing.Point[] points);
member this.DrawClosedCurve : System.Drawing.Pen * System.Drawing.Point[] -> unit

매개 변수

pen
Pen Pen Pen

곡선의 색, 너비 및 높이를 결정하는 Pen입니다.Pen that determines the color, width, and height of the curve.

points
Point[]

스플라인을 정의하는 Point 구조체의 배열입니다.Array of Point structures that define the spline.

예외

pennull인 경우pen is null.

또는-or- pointsnull인 경우points is null.

예제

다음 코드 예제는 Windows Forms에서 사용 하도록 설계 되었으며 필요 PaintEventArgs e의 매개 변수는 Paint 이벤트 처리기입니다.The following code example is designed for use with Windows Forms, and it requires PaintEventArgse, which is a parameter of the Paint event handler. 이 코드에서는 다음 작업을 수행합니다.The code performs the following actions:

  • 빨간색 및 녹색 펜을 만듭니다.Creates red and green pens.

  • 7 개의 점이 곡선을 만듭니다.Creates seven points to define a curve.

  • 닫힌 다각형는 7 개의 점이 간의 7 빨간색 직선을 그립니다.Draws seven red straight lines between the seven points to form a closed polygon.

  • 7 개의 점이 녹색 닫힌된 곡선을 그립니다.Draws a green closed curve through the seven points.

메서드는 0.5의 기본 장력을 사용 합니다.The method uses a default tension of 0.5.

private:
   void DrawClosedCurvePoint( PaintEventArgs^ e )
   {

      // Create pens.
      Pen^ redPen = gcnew Pen( Color::Red,3.0f );
      Pen^ greenPen = gcnew Pen( Color::Green,3.0f );

      // Create points that define curve.
      Point point1 = Point(50,50);
      Point point2 = Point(100,25);
      Point point3 = Point(200,5);
      Point point4 = Point(250,50);
      Point point5 = Point(300,100);
      Point point6 = Point(350,200);
      Point point7 = Point(250,250);
      array<Point>^ curvePoints = {point1,point2,point3,point4,point5,point6,point7};

      // Draw lines between original points to screen.
      e->Graphics->DrawLines( redPen, curvePoints );

      // Draw closed curve to screen.
      e->Graphics->DrawClosedCurve( greenPen, curvePoints );
   }
private void DrawClosedCurvePoint(PaintEventArgs e)
{
    // Create pens.
    Pen redPen   = new Pen(Color.Red, 3);
    Pen greenPen = new Pen(Color.Green, 3);
             
    // Create points that define curve.
    Point point1 = new Point(50,  50);
    Point point2 = new Point(100,  25);
    Point point3 = new Point(200,   5);
    Point point4 = new Point(250,  50);
    Point point5 = new Point(300, 100);
    Point point6 = new Point(350, 200);
    Point point7 = new Point(250, 250);
    Point[] curvePoints =
             {
                 point1,
                 point2,
                 point3,
                 point4,
                 point5,
                 point6,
                 point7
             };
             
    // Draw lines between original points to screen.
    e.Graphics.DrawLines(redPen, curvePoints);
             
    // Draw closed curve to screen.
    e.Graphics.DrawClosedCurve(greenPen, curvePoints);
}
Private Sub DrawClosedCurvePoint(ByVal e As PaintEventArgs)

    ' Create pens.
    Dim redPen As New Pen(Color.Red, 3)
    Dim greenPen As New Pen(Color.Green, 3)

    ' Create points that define curve.
    Dim point1 As New Point(50, 50)
    Dim point2 As New Point(100, 25)
    Dim point3 As New Point(200, 5)
    Dim point4 As New Point(250, 50)
    Dim point5 As New Point(300, 100)
    Dim point6 As New Point(350, 200)
    Dim point7 As New Point(250, 250)
    Dim curvePoints As Point() = {point1, point2, point3, point4, _
    point5, point6, point7}

    ' Draw lines between original points to screen.
    e.Graphics.DrawLines(redPen, curvePoints)

    ' Draw closed curve to screen.
    e.Graphics.DrawClosedCurve(greenPen, curvePoints)
End Sub

설명

이 메서드는 배열의 각 요소를 통과 하는 폐쇄형된 카디널 스플라인을 그립니다.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 the figure.

점 배열에 4 개 이상 있어야 Point 구조입니다.The array of points must contain at least four Point structures.

이 메서드는 0.5의 기본 장력을 사용 합니다.This method uses a default tension of 0.5.

DrawClosedCurve(Pen, PointF[]) DrawClosedCurve(Pen, PointF[]) DrawClosedCurve(Pen, PointF[])

PointF 구조체의 배열에 의해 정의되는 닫힌 카디널 스플라인을 그립니다.Draws a closed cardinal spline defined by an array of PointF structures.

public:
 void DrawClosedCurve(System::Drawing::Pen ^ pen, cli::array <System::Drawing::PointF> ^ points);
public void DrawClosedCurve (System.Drawing.Pen pen, System.Drawing.PointF[] points);
member this.DrawClosedCurve : System.Drawing.Pen * System.Drawing.PointF[] -> unit

매개 변수

pen
Pen Pen Pen

곡선의 색, 너비 및 높이를 결정하는 Pen입니다.Pen that determines the color, width, and height of the curve.

points
PointF[]

스플라인을 정의하는 PointF 구조체의 배열입니다.Array of PointF structures that define the spline.

예외

pennull인 경우pen is null.

또는-or- pointsnull인 경우points is null.

예제

다음 코드 예제는 Windows Forms에서 사용 하도록 설계 되었으며 필요 PaintEventArgs e의 매개 변수는 Paint 이벤트 처리기입니다.The following code example is designed for use with Windows Forms, and it requires PaintEventArgse, which is a parameter of the Paint event handler. 이 코드에서는 다음 작업을 수행합니다.The code performs the following actions:

  • 빨간색 및 녹색 펜을 만듭니다.Creates red and green pens.

  • 7 개의 점이 곡선을 만듭니다.Creates seven points to define a curve.

  • 닫힌 다각형는 7 개의 점이 간의 7 빨간색 직선을 그립니다.Draws seven red straight lines between the seven points to form a closed polygon.

  • 7 개의 점이 녹색 닫힌된 곡선을 그립니다.Draws a green closed curve through the seven points.

메서드는 0.5의 기본 장력을 사용 합니다.The method uses a default tension of 0.5.

private:
   void DrawClosedCurvePointF( PaintEventArgs^ e )
   {
      // Create pens.
      Pen^ redPen = gcnew Pen( Color::Red,3.0f );
      Pen^ greenPen = gcnew Pen( Color::Green,3.0f );

      // Create points that define curve.
      PointF point1 = PointF(50.0F,50.0F);
      PointF point2 = PointF(100.0F,25.0F);
      PointF point3 = PointF(200.0F,5.0F);
      PointF point4 = PointF(250.0F,50.0F);
      PointF point5 = PointF(300.0F,100.0F);
      PointF point6 = PointF(350.0F,200.0F);
      PointF point7 = PointF(250.0F,250.0F);
      array<PointF>^ curvePoints = {point1,point2,point3,point4,point5,point6,point7};

      // Draw lines between original points to screen.
      e->Graphics->DrawLines( redPen, curvePoints );

      // Draw closed curve to screen.
      e->Graphics->DrawClosedCurve( greenPen, curvePoints );
   }
private void DrawClosedCurvePointF(PaintEventArgs e)
{

    // Create pens.
    Pen redPen = new Pen(Color.Red, 3);
    Pen greenPen = new Pen(Color.Green, 3);

    // Create points that define curve.
    PointF point1 = new PointF(50.0F, 50.0F);
    PointF point2 = new PointF(100.0F, 25.0F);
    PointF point3 = new PointF(200.0F, 5.0F);
    PointF point4 = new PointF(250.0F, 50.0F);
    PointF point5 = new PointF(300.0F, 100.0F);
    PointF point6 = new PointF(350.0F, 200.0F);
    PointF point7 = new PointF(250.0F, 250.0F);
    PointF[] curvePoints = {point1, point2, point3, point4, point5, point6, point7};

    // Draw lines between original points to screen.
    e.Graphics.DrawLines(redPen, curvePoints);

    // Draw closed curve to screen.
    e.Graphics.DrawClosedCurve(greenPen, curvePoints);
}
Private Sub DrawClosedCurvePointF(ByVal e As PaintEventArgs)

    ' Create pens.
    Dim redPen As New Pen(Color.Red, 3)
    Dim greenPen As New Pen(Color.Green, 3)

    ' Create points that define curve.
    Dim point1 As New PointF(50.0F, 50.0F)
    Dim point2 As New PointF(100.0F, 25.0F)
    Dim point3 As New PointF(200.0F, 5.0F)
    Dim point4 As New PointF(250.0F, 50.0F)
    Dim point5 As New PointF(300.0F, 100.0F)
    Dim point6 As New PointF(350.0F, 200.0F)
    Dim point7 As New PointF(250.0F, 250.0F)
    Dim curvePoints As PointF() = {point1, point2, point3, point4, _
    point5, point6, point7}

    ' Draw lines between original points to screen.
    e.Graphics.DrawLines(redPen, curvePoints)

    ' Draw closed curve to screen.
    e.Graphics.DrawClosedCurve(greenPen, curvePoints)
End Sub

설명

이 메서드는 배열의 각 요소를 통과 하는 폐쇄형된 카디널 스플라인을 그립니다.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.

점 배열에 4 개 이상 있어야 PointF 구조입니다.The array of points must contain at least four PointF structures.

이 메서드는 0.5의 기본 장력을 사용 합니다.This method uses a default tension of 0.5.

적용 대상