GraphicsPath.AddCurve 메서드

정의

스플라인 곡선을 현재 그림에 추가합니다. 곡선이 배열에 있는 각 지점을 모두 지나므로 카디널 스플라인 곡선이 사용됩니다.

오버로드

AddCurve(ReadOnlySpan<Point>, Single)
AddCurve(PointF[], Int32, Int32, Single)

스플라인 곡선을 현재 그림에 추가합니다.

AddCurve(Point[], Int32, Int32, Single)

스플라인 곡선을 현재 그림에 추가합니다.

AddCurve(ReadOnlySpan<PointF>, Single)
AddCurve(PointF[], Single)

스플라인 곡선을 현재 그림에 추가합니다.

AddCurve(Point[])

스플라인 곡선을 현재 그림에 추가합니다. 곡선이 배열에 있는 각 지점을 모두 지나므로 카디널 스플라인 곡선이 사용됩니다.

AddCurve(ReadOnlySpan<PointF>)
AddCurve(ReadOnlySpan<Point>)
AddCurve(PointF[])

스플라인 곡선을 현재 그림에 추가합니다. 곡선이 배열에 있는 각 지점을 모두 지나므로 카디널 스플라인 곡선이 사용됩니다.

AddCurve(Point[], Single)

스플라인 곡선을 현재 그림에 추가합니다.

AddCurve(ReadOnlySpan<Point>, Single)

Source:
GraphicsPath.cs
public:
 void AddCurve(ReadOnlySpan<System::Drawing::Point> points, float tension);
public void AddCurve (ReadOnlySpan<System.Drawing.Point> points, float tension);
member this.AddCurve : ReadOnlySpan<System.Drawing.Point> * single -> unit
Public Sub AddCurve (points As ReadOnlySpan(Of Point), tension As Single)

매개 변수

tension
Single

적용 대상

AddCurve(PointF[], Int32, Int32, Single)

Source:
GraphicsPath.cs
Source:
GraphicsPath.cs
Source:
GraphicsPath.cs

스플라인 곡선을 현재 그림에 추가합니다.

public:
 void AddCurve(cli::array <System::Drawing::PointF> ^ points, int offset, int numberOfSegments, float tension);
public void AddCurve (System.Drawing.PointF[] points, int offset, int numberOfSegments, float tension);
member this.AddCurve : System.Drawing.PointF[] * int * int * single -> unit
Public Sub AddCurve (points As PointF(), offset As Integer, numberOfSegments As Integer, tension As Single)

매개 변수

points
PointF[]

곡선을 정의하는 지점을 나타내는 PointF 구조체의 배열입니다.

offset
Int32

곡선의 첫째 지점으로 사용되는 points 배열에 있는 요소의 인덱스입니다.

numberOfSegments
Int32

곡선을 그리는 데 사용되는 세그먼트 수입니다. 세그먼트는 두 지점을 연결하는 선입니다.

tension
Single

제어점 사이의 곡률을 지정하는 값입니다. 1보다 큰 값을 설정하면 예기치 않은 결과가 발생할 수 있습니다.

예제

예제를 보려면 AddCurve(Point[], Int32, Int32, Single)를 참조하세요.

설명

필요한 경우 사용자는 원래 지점을 유지해야 합니다. 원래 지점은 내부적으로 입방형 베지어 제어점으로 변환되므로 원래 점을 반환하는 메커니즘이 없습니다.

곡선은 로 지정된 offset배열의 지점에서 시작되며 로 지정된 numberOfSegments점(세그먼트)의 수를 포함합니다.

적용 대상

AddCurve(Point[], Int32, Int32, Single)

Source:
GraphicsPath.cs
Source:
GraphicsPath.cs
Source:
GraphicsPath.cs

스플라인 곡선을 현재 그림에 추가합니다.

public:
 void AddCurve(cli::array <System::Drawing::Point> ^ points, int offset, int numberOfSegments, float tension);
public void AddCurve (System.Drawing.Point[] points, int offset, int numberOfSegments, float tension);
member this.AddCurve : System.Drawing.Point[] * int * int * single -> unit
Public Sub AddCurve (points As Point(), offset As Integer, numberOfSegments As Integer, tension As Single)

매개 변수

points
Point[]

곡선을 정의하는 지점을 나타내는 Point 구조체의 배열입니다.

offset
Int32

곡선의 첫째 지점으로 사용되는 points 배열에 있는 요소의 인덱스입니다.

numberOfSegments
Int32

제어점 사이의 곡률을 지정하는 값입니다. 1보다 큰 값을 설정하면 예기치 않은 결과가 발생할 수 있습니다.

tension
Single

제어점 사이의 곡률을 지정하는 값입니다. 1보다 큰 값을 설정하면 예기치 않은 결과가 발생할 수 있습니다.

예제

다음 코드 예제는 Windows Forms 사용하도록 설계되었으며 이벤트 개체인 가 OnPaint 필요합니다PaintEventArgse. 코드는 다음 작업을 수행합니다.

  • 4개의 점 배열(카디널 스플라인을 나타낸)을 만듭니다.

  • 경로를 만들고 점 배열을 사용하여 경로에 곡선을 추가합니다.

  • 화면의 경로를 그립니다.

배열에는 4개의 점이 있지만 3개의 세그먼트만 있습니다. 이는 에 대한 호출 AddCurve의 세 번째 인수에 지정된 숫자입니다.

private:
   void AddCurveExample( PaintEventArgs^ e )
   {
      // Create some points.
      Point point1 = Point(20,20);
      Point point2 = Point(40,0);
      Point point3 = Point(60,40);
      Point point4 = Point(80,20);

      // Create an array of the points.
      array<Point>^ curvePoints = {point1,point2,point3,point4};

      // Create a GraphicsPath object and add a curve.
      GraphicsPath^ myPath = gcnew GraphicsPath;
      myPath->AddCurve( curvePoints, 0, 3, 0.8f );

      // Draw the path to the screen.
      Pen^ myPen = gcnew Pen( Color::Black,2.0f );
      e->Graphics->DrawPath( myPen, myPath );
   }
private void AddCurveExample(PaintEventArgs e)
{
             
    // Create some points.
    Point point1 = new Point(20, 20);
    Point point2 = new Point(40, 0);
    Point point3 = new Point(60, 40);
    Point point4 = new Point(80, 20);
             
    // Create an array of the points.
    Point[] curvePoints = {point1, point2, point3, point4};
             
    // Create a GraphicsPath object and add a curve.
    GraphicsPath myPath = new GraphicsPath();
    myPath.AddCurve(curvePoints, 0, 3, 0.8f);
             
    // Draw the path to the screen.
    Pen myPen = new Pen(Color.Black, 2);
    e.Graphics.DrawPath(myPen, myPath);
}
Public Sub AddCurveExample(ByVal e As PaintEventArgs)

    ' Create some points.
    Dim point1 As New Point(20, 20)
    Dim point2 As New Point(40, 0)
    Dim point3 As New Point(60, 40)
    Dim point4 As New Point(80, 20)

    ' Create an array of the points.
    Dim curvePoints As Point() = {point1, point2, point3, point4}

    ' Create a GraphicsPath object and add a curve.
    Dim myPath As New GraphicsPath
    myPath.AddCurve(curvePoints, 0, 3, 0.8F)

    ' Draw the path to the screen.
    Dim myPen As New Pen(Color.Black, 2)
    e.Graphics.DrawPath(myPen, myPath)
End Sub

설명

필요한 경우 사용자는 원래 지점을 유지해야 합니다. 원래 지점은 내부적으로 입방형 베지어 제어점으로 변환되므로 원래 점을 반환하는 메커니즘이 없습니다.

곡선은 매개 변수로 지정된 offset 배열의 지점에서 시작되며 에 지정된 numberOfSegments점(세그먼트)의 수를 포함합니다.

적용 대상

AddCurve(ReadOnlySpan<PointF>, Single)

Source:
GraphicsPath.cs
public:
 void AddCurve(ReadOnlySpan<System::Drawing::PointF> points, float tension);
public void AddCurve (ReadOnlySpan<System.Drawing.PointF> points, float tension);
member this.AddCurve : ReadOnlySpan<System.Drawing.PointF> * single -> unit
Public Sub AddCurve (points As ReadOnlySpan(Of PointF), tension As Single)

매개 변수

tension
Single

적용 대상

AddCurve(PointF[], Single)

Source:
GraphicsPath.cs
Source:
GraphicsPath.cs
Source:
GraphicsPath.cs

스플라인 곡선을 현재 그림에 추가합니다.

public:
 void AddCurve(cli::array <System::Drawing::PointF> ^ points, float tension);
public void AddCurve (System.Drawing.PointF[] points, float tension);
member this.AddCurve : System.Drawing.PointF[] * single -> unit
Public Sub AddCurve (points As PointF(), tension As Single)

매개 변수

points
PointF[]

곡선을 정의하는 지점을 나타내는 PointF 구조체의 배열입니다.

tension
Single

제어점 사이의 곡률을 지정하는 값입니다. 1보다 큰 값을 설정하면 예기치 않은 결과가 발생할 수 있습니다.

예제

예제를 보려면 AddCurve(Point[], Int32, Int32, Single)를 참조하세요.

설명

필요한 경우 사용자는 원래 지점을 유지해야 합니다. 원래 지점은 내부적으로 입방형 베지어 제어점으로 변환되므로 원래 점을 반환하는 메커니즘이 없습니다.

적용 대상

AddCurve(Point[])

Source:
GraphicsPath.cs
Source:
GraphicsPath.cs
Source:
GraphicsPath.cs

스플라인 곡선을 현재 그림에 추가합니다. 곡선이 배열에 있는 각 지점을 모두 지나므로 카디널 스플라인 곡선이 사용됩니다.

public:
 void AddCurve(cli::array <System::Drawing::Point> ^ points);
public:
 void AddCurve(... cli::array <System::Drawing::Point> ^ points);
public void AddCurve (System.Drawing.Point[] points);
public void AddCurve (params System.Drawing.Point[] points);
member this.AddCurve : System.Drawing.Point[] -> unit
Public Sub AddCurve (points As Point())
Public Sub AddCurve (ParamArray points As Point())

매개 변수

points
Point[]

곡선을 정의하는 지점을 나타내는 Point 구조체의 배열입니다.

예제

예제를 보려면 AddClosedCurve(Point[], Single)를 참조하세요.

설명

필요한 경우 사용자는 원래 지점을 유지해야 합니다. 원래 지점은 내부적으로 입방형 베지어 제어점으로 변환되므로 원래 점을 반환하는 메커니즘이 없습니다.

적용 대상

AddCurve(ReadOnlySpan<PointF>)

Source:
GraphicsPath.cs
public:
 void AddCurve(ReadOnlySpan<System::Drawing::PointF> points);
public void AddCurve (ReadOnlySpan<System.Drawing.PointF> points);
member this.AddCurve : ReadOnlySpan<System.Drawing.PointF> -> unit
Public Sub AddCurve (points As ReadOnlySpan(Of PointF))

매개 변수

적용 대상

AddCurve(ReadOnlySpan<Point>)

Source:
GraphicsPath.cs
public:
 void AddCurve(ReadOnlySpan<System::Drawing::Point> points);
public void AddCurve (ReadOnlySpan<System.Drawing.Point> points);
member this.AddCurve : ReadOnlySpan<System.Drawing.Point> -> unit
Public Sub AddCurve (points As ReadOnlySpan(Of Point))

매개 변수

적용 대상

AddCurve(PointF[])

Source:
GraphicsPath.cs
Source:
GraphicsPath.cs
Source:
GraphicsPath.cs

스플라인 곡선을 현재 그림에 추가합니다. 곡선이 배열에 있는 각 지점을 모두 지나므로 카디널 스플라인 곡선이 사용됩니다.

public:
 void AddCurve(cli::array <System::Drawing::PointF> ^ points);
public:
 void AddCurve(... cli::array <System::Drawing::PointF> ^ points);
public void AddCurve (System.Drawing.PointF[] points);
public void AddCurve (params System.Drawing.PointF[] points);
member this.AddCurve : System.Drawing.PointF[] -> unit
Public Sub AddCurve (points As PointF())
Public Sub AddCurve (ParamArray points As PointF())

매개 변수

points
PointF[]

곡선을 정의하는 지점을 나타내는 PointF 구조체의 배열입니다.

예제

예제를 보려면 AddCurve(Point[], Int32, Int32, Single)를 참조하세요.

설명

필요한 경우 사용자는 원래 지점을 유지해야 합니다. 원래 지점은 내부적으로 입방형 베지어 제어점으로 변환되므로 원래 점을 반환하는 메커니즘이 없습니다.

적용 대상

AddCurve(Point[], Single)

Source:
GraphicsPath.cs
Source:
GraphicsPath.cs
Source:
GraphicsPath.cs

스플라인 곡선을 현재 그림에 추가합니다.

public:
 void AddCurve(cli::array <System::Drawing::Point> ^ points, float tension);
public void AddCurve (System.Drawing.Point[] points, float tension);
member this.AddCurve : System.Drawing.Point[] * single -> unit
Public Sub AddCurve (points As Point(), tension As Single)

매개 변수

points
Point[]

곡선을 정의하는 지점을 나타내는 Point 구조체의 배열입니다.

tension
Single

제어점 사이의 곡률을 지정하는 값입니다. 1보다 큰 값을 설정하면 예기치 않은 결과가 발생할 수 있습니다.

예제

예제를 보려면 AddClosedCurve(Point[], Single)를 참조하세요.

설명

필요한 경우 사용자는 원래 지점을 유지해야 합니다. 원래 지점은 내부적으로 입방형 베지어 제어점으로 변환되므로 원래 점을 반환하는 메커니즘이 없습니다.

적용 대상