GraphicsPath.AddClosedCurve メソッド

定義

パスに閉じた曲線を追加します。 曲線は配列内の各点を結ぶため、カーディナル スプライン曲線を使用します。

オーバーロード

AddClosedCurve(Point[])

パスに閉じた曲線を追加します。 曲線は配列内の各点を結ぶため、カーディナル スプライン曲線を使用します。

AddClosedCurve(PointF[])

パスに閉じた曲線を追加します。 曲線は配列内の各点を結ぶため、カーディナル スプライン曲線を使用します。

AddClosedCurve(ReadOnlySpan<Point>)
AddClosedCurve(ReadOnlySpan<PointF>)
AddClosedCurve(Point[], Single)

パスに閉じた曲線を追加します。 曲線は配列内の各点を結ぶため、カーディナル スプライン曲線を使用します。

AddClosedCurve(PointF[], Single)

パスに閉じた曲線を追加します。 曲線は配列内の各点を結ぶため、カーディナル スプライン曲線を使用します。

AddClosedCurve(ReadOnlySpan<Point>, Single)
AddClosedCurve(ReadOnlySpan<PointF>, Single)

AddClosedCurve(Point[])

ソース:
GraphicsPath.cs
ソース:
GraphicsPath.cs
ソース:
GraphicsPath.cs

パスに閉じた曲線を追加します。 曲線は配列内の各点を結ぶため、カーディナル スプライン曲線を使用します。

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

パラメーター

points
Point[]

曲線を定義する複数の点を表す Point 構造体の配列。

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

注釈

ユーザーは、必要に応じて元のポイントを保持する必要があります。 元のポイントは内部的に 3 次ベジエコントロール ポイントに変換されるため、元のポイントを返すメカニズムはありません。 配列内の最初の点と最後の points 点が同じ点でない場合、曲線はこれら 2 つの点を接続することによって閉じられます。 このメソッドではテンション値を設定できず、既定値は 0.5 に相当する値です。

適用対象

AddClosedCurve(PointF[])

ソース:
GraphicsPath.cs
ソース:
GraphicsPath.cs
ソース:
GraphicsPath.cs

パスに閉じた曲線を追加します。 曲線は配列内の各点を結ぶため、カーディナル スプライン曲線を使用します。

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

パラメーター

points
PointF[]

曲線を定義する複数の点を表す PointF 構造体の配列。

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

注釈

ユーザーは、必要に応じて元のポイントを保持する必要があります。 元のポイントは内部的に 3 次ベジエコントロール ポイントに変換されるため、元のポイントを返すメカニズムはありません。 配列内の最初の点と最後の points 点が同じ点でない場合、曲線はこれら 2 つの点を接続することによって閉じられます。 このメソッドではテンション値を設定できず、既定値は 0.5 に相当する値です。

適用対象

AddClosedCurve(ReadOnlySpan<Point>)

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

パラメーター

適用対象

AddClosedCurve(ReadOnlySpan<PointF>)

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

パラメーター

適用対象

AddClosedCurve(Point[], Single)

ソース:
GraphicsPath.cs
ソース:
GraphicsPath.cs
ソース:
GraphicsPath.cs

パスに閉じた曲線を追加します。 曲線は配列内の各点を結ぶため、カーディナル スプライン曲線を使用します。

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

パラメーター

points
Point[]

曲線を定義する複数の点を表す Point 構造体の配列。

tension
Single

曲線が点の間で湾曲する度合いを指定する 0 ~ 1 の値。0 が最小 (急な曲線) で、1 の場合に最も滑らかな曲線になります。

次のコード例は、Windows フォームで使用するように設計されており、イベント オブジェクトがOnPaint必要PaintEventArgseです。 コードは、次のアクションを実行します。

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

  • パスを作成し、閉じたカーディナル スプライン曲線をパスに追加します (終点から始点に閉じます)。

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

0.5 のテンションが使用されていることに注意してください。

private:
   void AddClosedCurveExample( PaintEventArgs^ e )
   {
      // Creates a symetrical, closed curve.
      array<Point>^ myArray = {Point(20,100),Point(40,150),Point(60,125),Point(40,100),Point(60,75),Point(40,50)};

      // Create a new path and add curve.
      GraphicsPath^ myPath = gcnew GraphicsPath;
      myPath->AddClosedCurve( myArray, .5f );
      Pen^ myPen = gcnew Pen( Color::Black,2.0f );

      // Draw the path to screen.
      e->Graphics->DrawPath( myPen, myPath );
   }
private void AddClosedCurveExample(PaintEventArgs e)
{
             
    // Creates a symmetrical, closed curve.
    Point[] myArray =
             {
                 new Point(20,100),
                 new Point(40,150),
                 new Point(60,125),
                 new Point(40,100),
                 new Point(60,75),
                 new Point(40,50)
             };
             
    // Create a new path and add curve.
    GraphicsPath myPath = new GraphicsPath();
    myPath.AddClosedCurve(myArray,.5f);
    Pen myPen = new Pen(Color.Black, 2);
             
    // Draw the path to screen.
    e.Graphics.DrawPath(myPen, myPath);
}
Public Sub AddClosedCurveExample(ByVal e As PaintEventArgs)

    ' Creates a symmetrical, closed curve.
    Dim myArray As Point() = {New Point(20, 100), New Point(40, 150), _
    New Point(60, 125), New Point(40, 100), New Point(60, 75), _
    New Point(40, 50)}
    Dim myPath As New GraphicsPath
    myPath.AddClosedCurve(myArray, 0.5F)
    Dim myPen As New Pen(Color.Black, 2)
    e.Graphics.DrawPath(myPen, myPath)
End Sub

注釈

ユーザーは、必要に応じて元のポイントを保持する必要があります。 元のポイントは内部的に 3 次ベジエコントロール ポイントに変換されるため、元のポイントを返すメカニズムはありません。 配列内の最初の点と最後の points 点が同じ点でない場合、曲線はこれら 2 つの点を接続することによって閉じられます。

適用対象

AddClosedCurve(PointF[], Single)

ソース:
GraphicsPath.cs
ソース:
GraphicsPath.cs
ソース:
GraphicsPath.cs

パスに閉じた曲線を追加します。 曲線は配列内の各点を結ぶため、カーディナル スプライン曲線を使用します。

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

パラメーター

points
PointF[]

曲線を定義する複数の点を表す PointF 構造体の配列。

tension
Single

曲線が点の間で湾曲する度合いを指定する 0 ~ 1 の値。0 が最小 (急な曲線) で、1 の場合に最も滑らかな曲線になります。

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

注釈

ユーザーは、必要に応じて元のポイントを保持する必要があります。 元のポイントは内部的に 3 次ベジエコントロール ポイントに変換されるため、元のポイントを返すメカニズムはありません。 配列内の最初の点と最後の points 点が同じ点でない場合、曲線はこれら 2 つの点を接続することによって閉じられます。

適用対象

AddClosedCurve(ReadOnlySpan<Point>, Single)

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

パラメーター

tension
Single

適用対象

AddClosedCurve(ReadOnlySpan<PointF>, Single)

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

パラメーター

tension
Single

適用対象