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)

ソース:
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)

ソース:
GraphicsPath.cs
ソース:
GraphicsPath.cs
ソース:
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

曲線の描画に使用されるセグメントの数。 セグメントは、2 つの点を接続する直線と見なすことができます。

tension
Single

曲線が制御点の間で湾曲する度合いを指定する値。 1 より大きい値の場合、予期しない結果が発生します。

例については、「AddCurve(Point[], Int32, Int32, Single)」を参照してください。

注釈

ユーザーは、必要に応じて元のポイントを保持する必要があります。 元のポイントは内部的に 3 次ベジエコントロール ポイントに変換されるため、元のポイントを返すメカニズムはありません。

曲線は、 で指定された配列内のポイントから始まり、 で offset指定されたポイント (セグメント) の数が numberOfSegments含まれます。

適用対象

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

ソース:
GraphicsPath.cs
ソース:
GraphicsPath.cs
ソース:
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 フォームで使用するように設計されており、イベント オブジェクトがOnPaint必要PaintEventArgseです。 コードは、次のアクションを実行します。

  • (カーディナル スプラインを表す) 4 つのポイントの配列を作成します。

  • パスを作成し、ポイントの配列を使用して、パスに曲線を追加します。

  • 画面へのパスを描画します。

配列は 4 つのポイントを保持していますが、 の呼び出し AddCurveの 3 番目の引数で指定された数であるセグメントは 3 つだけであることに注意してください。

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

注釈

ユーザーは、必要に応じて元のポイントを保持する必要があります。 元のポイントは内部的に 3 次ベジエコントロール ポイントに変換されるため、元のポイントを返すメカニズムはありません。

曲線は、 パラメーターで指定された配列内のポイントから始まり、 で offset 指定されたポイント (セグメント) の数が numberOfSegments含まれます。

適用対象

AddCurve(ReadOnlySpan<PointF>, Single)

ソース:
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)

ソース:
GraphicsPath.cs
ソース:
GraphicsPath.cs
ソース:
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)」を参照してください。

注釈

ユーザーは、必要に応じて元のポイントを保持する必要があります。 元のポイントは内部的に 3 次ベジエコントロール ポイントに変換されるため、元のポイントを返すメカニズムはありません。

適用対象

AddCurve(Point[])

ソース:
GraphicsPath.cs
ソース:
GraphicsPath.cs
ソース:
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)」を参照してください。

注釈

ユーザーは、必要に応じて元のポイントを保持する必要があります。 元のポイントは内部的に 3 次ベジエコントロール ポイントに変換されるため、元のポイントを返すメカニズムはありません。

適用対象

AddCurve(ReadOnlySpan<PointF>)

ソース:
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>)

ソース:
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[])

ソース:
GraphicsPath.cs
ソース:
GraphicsPath.cs
ソース:
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)」を参照してください。

注釈

ユーザーは、必要に応じて元のポイントを保持する必要があります。 元のポイントは内部的に 3 次ベジエコントロール ポイントに変換されるため、元のポイントを返すメカニズムはありません。

適用対象

AddCurve(Point[], Single)

ソース:
GraphicsPath.cs
ソース:
GraphicsPath.cs
ソース:
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)」を参照してください。

注釈

ユーザーは、必要に応じて元のポイントを保持する必要があります。 元のポイントは内部的に 3 次ベジエコントロール ポイントに変換されるため、元のポイントを返すメカニズムはありません。

適用対象