Graphics.DrawBezier Graphics.DrawBezier Graphics.DrawBezier Method

정의

네 개의 Point 구조체로 정의되는 3차원 곡선 스플라인을 그립니다.Draws a Bézier spline defined by four Point structures.

오버로드

DrawBezier(Pen, Point, Point, Point, Point) DrawBezier(Pen, Point, Point, Point, Point) DrawBezier(Pen, Point, Point, Point, Point)

네 개의 Point 구조체로 정의되는 3차원 곡선 스플라인을 그립니다.Draws a Bézier spline defined by four Point structures.

DrawBezier(Pen, PointF, PointF, PointF, PointF) DrawBezier(Pen, PointF, PointF, PointF, PointF) DrawBezier(Pen, PointF, PointF, PointF, PointF)

네 개의 PointF 구조체로 정의되는 3차원 곡선 스플라인을 그립니다.Draws a Bézier spline defined by four PointF structures.

DrawBezier(Pen, Single, Single, Single, Single, Single, Single, Single, Single) DrawBezier(Pen, Single, Single, Single, Single, Single, Single, Single, Single) DrawBezier(Pen, Single, Single, Single, Single, Single, Single, Single, Single)

점을 나타내는 순서가 있는 네 개의 좌표 쌍에 의해 정의되는 3차원 곡선 스플라인을 그립니다.Draws a Bézier spline defined by four ordered pairs of coordinates that represent points.

DrawBezier(Pen, Point, Point, Point, Point) DrawBezier(Pen, Point, Point, Point, Point) DrawBezier(Pen, Point, Point, Point, Point)

네 개의 Point 구조체로 정의되는 3차원 곡선 스플라인을 그립니다.Draws a Bézier spline defined by four Point structures.

public:
 void DrawBezier(System::Drawing::Pen ^ pen, System::Drawing::Point pt1, System::Drawing::Point pt2, System::Drawing::Point pt3, System::Drawing::Point pt4);
public void DrawBezier (System.Drawing.Pen pen, System.Drawing.Point pt1, System.Drawing.Point pt2, System.Drawing.Point pt3, System.Drawing.Point pt4);
member this.DrawBezier : System.Drawing.Pen * System.Drawing.Point * System.Drawing.Point * System.Drawing.Point * System.Drawing.Point -> unit

매개 변수

pen
Pen Pen Pen

곡선의 색, 너비 및 스타일을 결정하는 Pen 구조체입니다.Pen structure that determines the color, width, and style of the curve.

pt1
Point Point Point

곡선의 시작점을 나타내는 Point 구조체입니다.Point structure that represents the starting point of the curve.

pt2
Point Point Point

곡선의 첫째 제어점을 나타내는 Point 구조체입니다.Point structure that represents the first control point for the curve.

pt3
Point Point Point

곡선의 둘째 제어점을 나타내는 Point 구조체입니다.Point structure that represents the second control point for the curve.

pt4
Point Point Point

곡선의 끝점을 나타내는 Point 구조체입니다.Point structure that represents the ending point of the curve.

예외

예제

다음 코드 예제는 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:

  • Black 펜을 만듭니다.Creates a black pen.

  • 시작, 종료 및 곡선에 대 한 두 개의 제어점을 만듭니다.Creates the start, end, and two control points for the curve.

  • 화면에 베 지 어 곡선을 그립니다.Draws the Bézier curve to the screen.

private:
   void DrawBezierPoint( PaintEventArgs^ e )
   {
      // Create pen.
      Pen^ blackPen = gcnew Pen( Color::Black,3.0f );

      // Create points for curve.
      Point start = Point(100,100);
      Point control1 = Point(200,10);
      Point control2 = Point(350,50);
      Point end = Point(500,100);

      // Draw arc to screen.
      e->Graphics->DrawBezier( blackPen, start, control1, control2, end );
   }
private void DrawBezierPoint(PaintEventArgs e)
{
    // Create pen.
    Pen blackPen = new Pen(Color.Black, 3);
             
    // Create points for curve.
    Point start = new Point(100, 100);
    Point control1 = new Point(200, 10);
    Point control2 = new Point(350, 50);
    Point end = new Point(500, 100);
             
    // Draw arc to screen.
    e.Graphics.DrawBezier(blackPen, start, control1, control2, end);
}
Private Sub DrawBezierPoint(ByVal e As PaintEventArgs)

    ' Create pen.
    Dim blackPen As New Pen(Color.Black, 3)

    ' Create points for curve.
    Dim start As New Point(100, 100)
    Dim control1 As New Point(200, 10)
    Dim control2 As New Point(350, 50)
    Dim [end] As New Point(500, 100)

    ' Draw arc to screen.
    e.Graphics.DrawBezier(blackPen, start, control1, control2, [end])
End Sub

설명

베 지 어 곡선의 첫 번째 요소에서 네 번째 지점에 그려집니다.The Bézier curve is drawn from the first point to the fourth point. 두 번째 및 세 번째 요소는 곡선의 모양을 결정 하는 컨트롤 요소입니다.The second and third points are control points that determine the shape of the curve.

DrawBezier(Pen, PointF, PointF, PointF, PointF) DrawBezier(Pen, PointF, PointF, PointF, PointF) DrawBezier(Pen, PointF, PointF, PointF, PointF)

네 개의 PointF 구조체로 정의되는 3차원 곡선 스플라인을 그립니다.Draws a Bézier spline defined by four PointF structures.

public:
 void DrawBezier(System::Drawing::Pen ^ pen, System::Drawing::PointF pt1, System::Drawing::PointF pt2, System::Drawing::PointF pt3, System::Drawing::PointF pt4);
public void DrawBezier (System.Drawing.Pen pen, System.Drawing.PointF pt1, System.Drawing.PointF pt2, System.Drawing.PointF pt3, System.Drawing.PointF pt4);
member this.DrawBezier : System.Drawing.Pen * System.Drawing.PointF * System.Drawing.PointF * System.Drawing.PointF * System.Drawing.PointF -> unit

매개 변수

pen
Pen Pen Pen

곡선의 색, 너비 및 스타일을 결정하는 Pen입니다.Pen that determines the color, width, and style of the curve.

pt1
PointF PointF PointF

곡선의 시작점을 나타내는 PointF 구조체입니다.PointF structure that represents the starting point of the curve.

pt2
PointF PointF PointF

곡선의 첫째 제어점을 나타내는 PointF 구조체입니다.PointF structure that represents the first control point for the curve.

pt3
PointF PointF PointF

곡선의 둘째 제어점을 나타내는 PointF 구조체입니다.PointF structure that represents the second control point for the curve.

pt4
PointF PointF PointF

곡선의 끝점을 나타내는 PointF 구조체입니다.PointF structure that represents the ending point of the curve.

예외

예제

다음 코드 예제는 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:

  • Black 펜을 만듭니다.Creates a black pen.

  • 시작, 종료 및 곡선에 대 한 두 개의 제어점을 만듭니다.Creates the start, end, and two control points for the curve.

  • 화면에 베 지 어 곡선을 그립니다.Draws the Bézier curve to the screen.

private:
   void DrawBezierPointF( PaintEventArgs^ e )
   {
      // Create pen.
      Pen^ blackPen = gcnew Pen( Color::Black,3.0f );

      // Create points for curve.
      PointF start = PointF(100.0F,100.0F);
      PointF control1 = PointF(200.0F,10.0F);
      PointF control2 = PointF(350.0F,50.0F);
      PointF end = PointF(500.0F,100.0F);

      // Draw arc to screen.
      e->Graphics->DrawBezier( blackPen, start, control1, control2, end );
   }
private void DrawBezierPointF(PaintEventArgs e)
{
    // Create pen.
    Pen blackPen = new Pen(Color.Black, 3);
             
    // Create points for curve.
    PointF start = new PointF(100.0F, 100.0F);
    PointF control1 = new PointF(200.0F, 10.0F);
    PointF control2 = new PointF(350.0F, 50.0F);
    PointF end = new PointF(500.0F, 100.0F);
             
    // Draw arc to screen.
    e.Graphics.DrawBezier(blackPen, start, control1, control2, end);
}
Private Sub DrawBezierPointF(ByVal e As PaintEventArgs)

    ' Create pen.
    Dim blackPen As New Pen(Color.Black, 3)

    ' Create points for curve.
    Dim start As New PointF(100.0F, 100.0F)
    Dim control1 As New PointF(200.0F, 10.0F)
    Dim control2 As New PointF(350.0F, 50.0F)
    Dim [end] As New PointF(500.0F, 100.0F)

    ' Draw arc to screen.
    e.Graphics.DrawBezier(blackPen, start, control1, control2, [end])
End Sub

설명

베 지 어 스플라인은 첫 번째 요소에서 네 번째 지점에 그려집니다.The Bézier spline is drawn from the first point to the fourth point. 두 번째 및 세 번째 요소는 곡선의 모양을 결정 하는 컨트롤 요소입니다.The second and third points are control points that determine the shape of the curve.

DrawBezier(Pen, Single, Single, Single, Single, Single, Single, Single, Single) DrawBezier(Pen, Single, Single, Single, Single, Single, Single, Single, Single) DrawBezier(Pen, Single, Single, Single, Single, Single, Single, Single, Single)

점을 나타내는 순서가 있는 네 개의 좌표 쌍에 의해 정의되는 3차원 곡선 스플라인을 그립니다.Draws a Bézier spline defined by four ordered pairs of coordinates that represent points.

public:
 void DrawBezier(System::Drawing::Pen ^ pen, float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4);
public void DrawBezier (System.Drawing.Pen pen, float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4);
member this.DrawBezier : System.Drawing.Pen * single * single * single * single * single * single * single * single -> unit

매개 변수

pen
Pen Pen Pen

곡선의 색, 너비 및 스타일을 결정하는 Pen입니다.Pen that determines the color, width, and style of the curve.

x1
Single Single Single

곡선의 시작점에 대한 X좌표입니다.The x-coordinate of the starting point of the curve.

y1
Single Single Single

곡선의 시작점에 대한 Y좌표입니다.The y-coordinate of the starting point of the curve.

x2
Single Single Single

곡선의 첫째 제어점에 대한 X좌표입니다.The x-coordinate of the first control point of the curve.

y2
Single Single Single

곡선의 첫째 제어점에 대한 Y좌표입니다.The y-coordinate of the first control point of the curve.

x3
Single Single Single

곡선의 둘째 제어점에 대한 X좌표입니다.The x-coordinate of the second control point of the curve.

y3
Single Single Single

곡선의 둘째 제어점에 대한 Y좌표입니다.The y-coordinate of the second control point of the curve.

x4
Single Single Single

곡선의 끝점에 대한 X좌표입니다.The x-coordinate of the ending point of the curve.

y4
Single Single Single

곡선의 끝점에 대한 Y좌표입니다.The y-coordinate of the ending point of the curve.

예외

예제

다음 코드 예제는 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:

  • Black 펜을 만듭니다.Creates a black pen.

  • 시작, 종료 및 곡선에 대 한 두 개의 제어점 좌표를 만듭니다.Creates the coordinates of the start, end, and two control points for the curve.

  • 화면에 베 지 어 곡선을 그립니다.Draws the Bézier curve to the screen.

private:
   void DrawBezierFloat( PaintEventArgs^ e )
   {
      // Create pen.
      Pen^ blackPen = gcnew Pen( Color::Black,3.0f );

      // Create coordinates of points for curve.
      float startX = 100.0F;
      float startY = 100.0F;
      float controlX1 = 200.0F;
      float controlY1 = 10.0F;
      float controlX2 = 350.0F;
      float controlY2 = 50.0F;
      float endX = 500.0F;
      float endY = 100.0F;

      // Draw arc to screen.
      e->Graphics->DrawBezier( blackPen, startX, startY, controlX1, controlY1, controlX2, controlY2, endX, endY );
   }
private void DrawBezierFloat(PaintEventArgs e)
{
    // Create pen.
    Pen blackPen = new Pen(Color.Black, 3);
             
    // Create coordinates of points for curve.
    float startX = 100.0F;
    float startY = 100.0F;
    float controlX1 = 200.0F;
    float controlY1 =  10.0F;
    float controlX2 = 350.0F;
    float controlY2 =  50.0F;
    float endX = 500.0F;
    float endY = 100.0F;
             
    // Draw arc to screen.
    e.Graphics.DrawBezier(blackPen, startX, startY,
        controlX1, controlY1,
        controlX2, controlY2,
        endX, endY);
}

' Begin Example03.
Private Sub DrawBezierFloat(ByVal e As PaintEventArgs)

    ' Create pen.
    Dim blackPen As New Pen(Color.Black, 3)

    ' Create coordinates of points for curve.
    Dim startX As Single = 100.0F
    Dim startY As Single = 100.0F
    Dim controlX1 As Single = 200.0F
    Dim controlY1 As Single = 10.0F
    Dim controlX2 As Single = 350.0F
    Dim controlY2 As Single = 50.0F
    Dim endX As Single = 500.0F
    Dim endY As Single = 100.0F

    ' Draw arc to screen.
    e.Graphics.DrawBezier(blackPen, startX, startY, controlX1, _
    controlY1, controlX2, controlY2, endX, endY)
End Sub

설명

베 지 어 스플라인은 첫 번째 요소에서 네 번째 지점에 그려집니다.The Bézier spline is drawn from the first point to the fourth point. 두 번째 및 세 번째 요소는 곡선의 모양을 결정 하는 컨트롤 요소입니다.The second and third points are control points that determine the shape of the curve.

적용 대상