次の方法で共有


Graphics.FillClosedCurve メソッド

定義

Point 構造の配列によって定義された閉じたカーディナル スプライン曲線の内部を塗りつぶします。

オーバーロード

FillClosedCurve(Brush, Point[])

Point 構造の配列によって定義された閉じたカーディナル スプライン曲線の内部を塗りつぶします。

FillClosedCurve(Brush, PointF[])

PointF 構造の配列によって定義された閉じたカーディナル スプライン曲線の内部を塗りつぶします。

FillClosedCurve(Brush, ReadOnlySpan<Point>)
FillClosedCurve(Brush, ReadOnlySpan<PointF>)
FillClosedCurve(Brush, Point[], FillMode)

指定したフィル モードを使用して、Point 構造の配列によって定義された閉じたカーディナル スプライン曲線の内部を塗りつぶします。

FillClosedCurve(Brush, PointF[], FillMode)

指定したフィル モードを使用して、PointF 構造の配列によって定義された閉じたカーディナル スプライン曲線の内部を塗りつぶします。

FillClosedCurve(Brush, ReadOnlySpan<Point>, FillMode)
FillClosedCurve(Brush, ReadOnlySpan<PointF>, FillMode)
FillClosedCurve(Brush, Point[], FillMode, Single)

指定したフィル モードとテンションを使用して、Point 構造の配列によって定義された閉じたカーディナル スプライン曲線の内部を塗りつぶします。

FillClosedCurve(Brush, PointF[], FillMode, Single)

指定したフィル モードとテンションを使用して、PointF 構造の配列によって定義された閉じたカーディナル スプライン曲線の内部を塗りつぶします。

FillClosedCurve(Brush, ReadOnlySpan<Point>, FillMode, Single)
FillClosedCurve(Brush, ReadOnlySpan<PointF>, FillMode, Single)

FillClosedCurve(Brush, Point[])

ソース:
Graphics.cs
ソース:
Graphics.cs
ソース:
Graphics.cs
ソース:
Graphics.cs
ソース:
Graphics.cs

Point 構造の配列によって定義された閉じたカーディナル スプライン曲線の内部を塗りつぶします。

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

パラメーター

brush
Brush

フィルの特性を決定する Brush

points
Point[]

スプラインを定義する Point 構造体の配列。

例外

brushnullです。

-又は-

pointsnullです。

次のコード例は Windows フォームで使用できるように設計されており、Paint イベント ハンドラーのパラメーターである PaintEventArgseが必要です。 このコードは、次のアクションを実行します。

  • 赤い純色のブラシを作成します。

  • スプラインを定義する 4 点の配列を作成します。

  • 画面上の曲線を塗りつぶします。

曲線の既定の張力は 0.5 です。

public:
   void FillClosedCurvePoint( PaintEventArgs^ e )
   {
      // Create solid brush.
      SolidBrush^ redBrush = gcnew SolidBrush( Color::Red );

      //Create array of points for curve.
      Point point1 = Point(100,100);
      Point point2 = Point(200,50);
      Point point3 = Point(250,200);
      Point point4 = Point(50,150);
      array<Point>^ points = {point1,point2,point3,point4};

      // Fill curve on screen.
      e->Graphics->FillClosedCurve( redBrush, points );
   }
public void FillClosedCurvePoint(PaintEventArgs e)
{
             
    // Create solid brush.
    SolidBrush redBrush = new SolidBrush(Color.Red);
             
    //Create array of points for curve.
    Point point1 = new Point(100, 100);
    Point point2 = new Point(200,  50);
    Point point3 = new Point(250, 200);
    Point point4 = new Point(50, 150);
    Point[] points = {point1, point2, point3, point4};
             
    // Fill curve on screen.
    e.Graphics.FillClosedCurve(redBrush, points);
}
Public Sub FillClosedCurvePoint(ByVal e As PaintEventArgs)

    ' Create solid brush.
    Dim redBrush As New SolidBrush(Color.Red)

    'Create array of points for curve.
    Dim point1 As New Point(100, 100)
    Dim point2 As New Point(200, 50)
    Dim point3 As New Point(250, 200)
    Dim point4 As New Point(50, 150)
    Dim points As Point() = {point1, point2, point3, point4}

    ' Fill curve on screen.
    e.Graphics.FillClosedCurve(redBrush, points)
End Sub

注釈

このメソッドは、配列内の各ポイントを通過する閉じたカーディナル スプラインの内部を塗りつぶします。 最後の点が最初の点と一致しない場合は、最後の点から最初の点に曲線セグメントを追加して閉じます。

ポイントの配列には、少なくとも 4 つの Point 構造体が含まれている必要があります。

この方法では、既定のテンション値 0.5 が使用されます。

適用対象

FillClosedCurve(Brush, PointF[])

ソース:
Graphics.cs
ソース:
Graphics.cs
ソース:
Graphics.cs
ソース:
Graphics.cs
ソース:
Graphics.cs

PointF 構造の配列によって定義された閉じたカーディナル スプライン曲線の内部を塗りつぶします。

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

パラメーター

brush
Brush

フィルの特性を決定する Brush

points
PointF[]

スプラインを定義する PointF 構造体の配列。

例外

brushnullです。

-又は-

pointsnullです。

次のコード例は Windows フォームで使用できるように設計されており、Paint イベント ハンドラーのパラメーターである PaintEventArgseが必要です。 このコードは、次のアクションを実行します。

  • 赤い純色のブラシを作成します。

  • スプラインを定義する 4 点の配列を作成します。

  • 画面上の曲線を塗りつぶします。

曲線の既定の張力は 0.5 です。

public:
   void FillClosedCurvePointF( PaintEventArgs^ e )
   {
      // Create solid brush.
      SolidBrush^ redBrush = gcnew SolidBrush( Color::Red );

      //Create array of points for curve.
      PointF point1 = PointF(100.0F,100.0F);
      PointF point2 = PointF(200.0F,50.0F);
      PointF point3 = PointF(250.0F,200.0F);
      PointF point4 = PointF(50.0F,150.0F);
      array<PointF>^ points = {point1,point2,point3,point4};

      // Fill curve on screen.
      e->Graphics->FillClosedCurve( redBrush, points );
   }
public void FillClosedCurvePointF(PaintEventArgs e)
{
             
    // Create solid brush.
    SolidBrush redBrush = new SolidBrush(Color.Red);
             
    //Create array of points for curve.
    PointF point1 = new PointF(100.0F, 100.0F);
    PointF point2 = new PointF(200.0F,  50.0F);
    PointF point3 = new PointF(250.0F, 200.0F);
    PointF point4 = new PointF(50.0F, 150.0F);
    PointF[] points = {point1, point2, point3, point4};
             
    // Fill curve on screen.
    e.Graphics.FillClosedCurve(redBrush, points);
}
Public Sub FillClosedCurvePointF(ByVal e As PaintEventArgs)

    ' Create solid brush.
    Dim redBrush As New SolidBrush(Color.Red)

    'Create array of points for curve.
    Dim point1 As New PointF(100.0F, 100.0F)
    Dim point2 As New PointF(200.0F, 50.0F)
    Dim point3 As New PointF(250.0F, 200.0F)
    Dim point4 As New PointF(50.0F, 150.0F)
    Dim points As PointF() = {point1, point2, point3, point4}

    ' Fill curve on screen.
    e.Graphics.FillClosedCurve(redBrush, points)
End Sub

注釈

このメソッドは、配列内の各ポイントを通過する閉じたカーディナル スプラインの内部を塗りつぶします。 最後の点が最初の点と一致しない場合は、最後の点から最初の点に曲線セグメントを追加して閉じます。

ポイントの配列には、少なくとも 4 つの PointF 構造体が含まれている必要があります。

この方法では、既定のテンション値 0.5 が使用されます。

適用対象

FillClosedCurve(Brush, ReadOnlySpan<Point>)

ソース:
Graphics.cs
ソース:
Graphics.cs
public:
 void FillClosedCurve(System::Drawing::Brush ^ brush, ReadOnlySpan<System::Drawing::Point> points);
public void FillClosedCurve (System.Drawing.Brush brush, ReadOnlySpan<System.Drawing.Point> points);
member this.FillClosedCurve : System.Drawing.Brush * ReadOnlySpan<System.Drawing.Point> -> unit
Public Sub FillClosedCurve (brush As Brush, points As ReadOnlySpan(Of Point))

パラメーター

brush
Brush

適用対象

FillClosedCurve(Brush, ReadOnlySpan<PointF>)

ソース:
Graphics.cs
ソース:
Graphics.cs
public:
 void FillClosedCurve(System::Drawing::Brush ^ brush, ReadOnlySpan<System::Drawing::PointF> points);
public void FillClosedCurve (System.Drawing.Brush brush, ReadOnlySpan<System.Drawing.PointF> points);
member this.FillClosedCurve : System.Drawing.Brush * ReadOnlySpan<System.Drawing.PointF> -> unit
Public Sub FillClosedCurve (brush As Brush, points As ReadOnlySpan(Of PointF))

パラメーター

brush
Brush

適用対象

FillClosedCurve(Brush, Point[], FillMode)

ソース:
Graphics.cs
ソース:
Graphics.cs
ソース:
Graphics.cs
ソース:
Graphics.cs
ソース:
Graphics.cs

指定したフィル モードを使用して、Point 構造の配列によって定義された閉じたカーディナル スプライン曲線の内部を塗りつぶします。

public:
 void FillClosedCurve(System::Drawing::Brush ^ brush, cli::array <System::Drawing::Point> ^ points, System::Drawing::Drawing2D::FillMode fillmode);
public void FillClosedCurve (System.Drawing.Brush brush, System.Drawing.Point[] points, System.Drawing.Drawing2D.FillMode fillmode);
member this.FillClosedCurve : System.Drawing.Brush * System.Drawing.Point[] * System.Drawing.Drawing2D.FillMode -> unit
Public Sub FillClosedCurve (brush As Brush, points As Point(), fillmode As FillMode)

パラメーター

brush
Brush

フィルの特性を決定する Brush

points
Point[]

スプラインを定義する Point 構造体の配列。

fillmode
FillMode

曲線の塗りつぶし方法を決定する FillMode 列挙体のメンバー。

例外

brushnullです。

-又は-

pointsnullです。

次のコード例は Windows フォームで使用できるように設計されており、Paint イベント ハンドラーのパラメーターである PaintEventArgseが必要です。 このコードは、次のアクションを実行します。

  • 赤い純色のブラシを作成します。

  • スプラインを定義する 4 点の配列を作成します。

  • 塗りつぶしモードを Windingに設定します。

  • 画面上の曲線を塗りつぶします。

曲線の既定の張力は 0.5 です。

public:
   void FillClosedCurvePointFillMode( PaintEventArgs^ e )
   {
      // Create solid brush.
      SolidBrush^ redBrush = gcnew SolidBrush( Color::Red );

      //Create array of points for curve.
      Point point1 = Point(100,100);
      Point point2 = Point(200,50);
      Point point3 = Point(250,200);
      Point point4 = Point(50,150);
      array<Point>^ points = {point1,point2,point3,point4};

      // Set fill mode.
      FillMode newFillMode = FillMode::Winding;

      // Fill curve on screen.
      e->Graphics->FillClosedCurve( redBrush, points, newFillMode );
   }
public void FillClosedCurvePointFillMode(PaintEventArgs e)
{
             
    // Create solid brush.
    SolidBrush redBrush = new SolidBrush(Color.Red);
             
    //Create array of points for curve.
    Point point1 = new Point(100, 100);
    Point point2 = new Point(200,  50);
    Point point3 = new Point(250, 200);
    Point point4 = new Point(50, 150);
    Point[] points = {point1, point2, point3, point4};
             
    // Set fill mode.
    FillMode newFillMode = FillMode.Winding;
             
    // Fill curve on screen.
    e.Graphics.FillClosedCurve(redBrush, points, newFillMode);
}
Public Sub FillClosedCurvePointFillMode(ByVal e As PaintEventArgs)

    ' Create solid brush.
    Dim redBrush As New SolidBrush(Color.Red)

    'Create array of points for curve.
    Dim point1 As New Point(100, 100)
    Dim point2 As New Point(200, 50)
    Dim point3 As New Point(250, 200)
    Dim point4 As New Point(50, 150)
    Dim points As Point() = {point1, point2, point3, point4}

    ' Set fill mode.
    Dim newFillMode As FillMode = FillMode.Winding

    ' Fill curve on screen.
    e.Graphics.FillClosedCurve(redBrush, points, newFillMode)
End Sub

注釈

このメソッドは、配列内の各ポイントを通過する閉じたカーディナル スプラインの内部を塗りつぶします。 最後の点が最初の点と一致しない場合は、最後の点から最初の点に曲線セグメントを追加して閉じます。

ポイントの配列には、少なくとも 4 つの Point 構造体が含まれている必要があります。

この方法では、既定のテンション値 0.5 が使用されます。

適用対象

FillClosedCurve(Brush, PointF[], FillMode)

ソース:
Graphics.cs
ソース:
Graphics.cs
ソース:
Graphics.cs
ソース:
Graphics.cs
ソース:
Graphics.cs

指定したフィル モードを使用して、PointF 構造の配列によって定義された閉じたカーディナル スプライン曲線の内部を塗りつぶします。

public:
 void FillClosedCurve(System::Drawing::Brush ^ brush, cli::array <System::Drawing::PointF> ^ points, System::Drawing::Drawing2D::FillMode fillmode);
public void FillClosedCurve (System.Drawing.Brush brush, System.Drawing.PointF[] points, System.Drawing.Drawing2D.FillMode fillmode);
member this.FillClosedCurve : System.Drawing.Brush * System.Drawing.PointF[] * System.Drawing.Drawing2D.FillMode -> unit
Public Sub FillClosedCurve (brush As Brush, points As PointF(), fillmode As FillMode)

パラメーター

brush
Brush

フィルの特性を決定する Brush

points
PointF[]

スプラインを定義する PointF 構造体の配列。

fillmode
FillMode

曲線の塗りつぶし方法を決定する FillMode 列挙体のメンバー。

例外

brushnullです。

-又は-

pointsnullです。

次のコード例は Windows フォームで使用できるように設計されており、Paint イベント ハンドラーのパラメーターである PaintEventArgseが必要です。 このコードは、次のアクションを実行します。

  • 赤い純色のブラシを作成します。

  • スプラインを定義する 4 点の配列を作成します。

  • 塗りつぶしモードを Windingに設定します。

  • 画面上の曲線を塗りつぶします。

曲線の既定の張力は 0.5 です。

public:
   void FillClosedCurvePointFFillMode( PaintEventArgs^ e )
   {
      // Create solid brush.
      SolidBrush^ redBrush = gcnew SolidBrush( Color::Red );

      // Create array of points for curve.
      PointF point1 = PointF(100.0F,100.0F);
      PointF point2 = PointF(200.0F,50.0F);
      PointF point3 = PointF(250.0F,200.0F);
      PointF point4 = PointF(50.0F,150.0F);
      array<PointF>^ points = {point1,point2,point3,point4};

      // Set fill mode.
      FillMode newFillMode = FillMode::Winding;

      // Fill curve on screen.
      e->Graphics->FillClosedCurve( redBrush, points, newFillMode );
   }
public void FillClosedCurvePointFFillMode(PaintEventArgs e)
{
             
    // Create solid brush.
    SolidBrush redBrush = new SolidBrush(Color.Red);
             
    // Create array of points for curve.
    PointF point1 = new PointF(100.0F, 100.0F);
    PointF point2 = new PointF(200.0F,  50.0F);
    PointF point3 = new PointF(250.0F, 200.0F);
    PointF point4 = new PointF(50.0F, 150.0F);
    PointF[] points = {point1, point2, point3, point4};
             
    // Set fill mode.
    FillMode newFillMode = FillMode.Winding;
             
    // Fill curve on screen.
    e.Graphics.FillClosedCurve(redBrush, points, newFillMode);
}
Public Sub FillClosedCurvePointFFillMode(ByVal e As PaintEventArgs)

    ' Create solid brush.
    Dim redBrush As New SolidBrush(Color.Red)

    ' Create array of points for curve.
    Dim point1 As New PointF(100.0F, 100.0F)
    Dim point2 As New PointF(200.0F, 50.0F)
    Dim point3 As New PointF(250.0F, 200.0F)
    Dim point4 As New PointF(50.0F, 150.0F)
    Dim points As PointF() = {point1, point2, point3, point4}

    ' Set fill mode.
    Dim newFillMode As FillMode = FillMode.Winding

    ' Fill curve on screen.
    e.Graphics.FillClosedCurve(redBrush, points, newFillMode)
End Sub

注釈

このメソッドは、配列内の各ポイントを通過する閉じたカーディナル スプラインの内部を塗りつぶします。 最後の点が最初の点と一致しない場合は、最後の点から最初の点に曲線セグメントを追加して閉じます。

ポイントの配列には、少なくとも 4 つの Point 構造体が含まれている必要があります。

この方法では、既定のテンション値 0.5 が使用されます。

適用対象

FillClosedCurve(Brush, ReadOnlySpan<Point>, FillMode)

ソース:
Graphics.cs
ソース:
Graphics.cs
public:
 void FillClosedCurve(System::Drawing::Brush ^ brush, ReadOnlySpan<System::Drawing::Point> points, System::Drawing::Drawing2D::FillMode fillmode);
public void FillClosedCurve (System.Drawing.Brush brush, ReadOnlySpan<System.Drawing.Point> points, System.Drawing.Drawing2D.FillMode fillmode);
member this.FillClosedCurve : System.Drawing.Brush * ReadOnlySpan<System.Drawing.Point> * System.Drawing.Drawing2D.FillMode -> unit
Public Sub FillClosedCurve (brush As Brush, points As ReadOnlySpan(Of Point), fillmode As FillMode)

パラメーター

brush
Brush
fillmode
FillMode

適用対象

FillClosedCurve(Brush, ReadOnlySpan<PointF>, FillMode)

ソース:
Graphics.cs
ソース:
Graphics.cs
public:
 void FillClosedCurve(System::Drawing::Brush ^ brush, ReadOnlySpan<System::Drawing::PointF> points, System::Drawing::Drawing2D::FillMode fillmode);
public void FillClosedCurve (System.Drawing.Brush brush, ReadOnlySpan<System.Drawing.PointF> points, System.Drawing.Drawing2D.FillMode fillmode);
member this.FillClosedCurve : System.Drawing.Brush * ReadOnlySpan<System.Drawing.PointF> * System.Drawing.Drawing2D.FillMode -> unit
Public Sub FillClosedCurve (brush As Brush, points As ReadOnlySpan(Of PointF), fillmode As FillMode)

パラメーター

brush
Brush
fillmode
FillMode

適用対象

FillClosedCurve(Brush, Point[], FillMode, Single)

ソース:
Graphics.cs
ソース:
Graphics.cs
ソース:
Graphics.cs
ソース:
Graphics.cs
ソース:
Graphics.cs

指定したフィル モードとテンションを使用して、Point 構造の配列によって定義された閉じたカーディナル スプライン曲線の内部を塗りつぶします。

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

パラメーター

brush
Brush

フィルの特性を決定する Brush

points
Point[]

スプラインを定義する Point 構造体の配列。

fillmode
FillMode

曲線の塗りつぶし方法を決定する FillMode 列挙体のメンバー。

tension
Single

曲線の張力を指定する 0.0F 以上の値。

例外

brushnullです。

-又は-

pointsnullです。

次のコード例は Windows フォームで使用できるように設計されており、Paint イベント ハンドラーのパラメーターである PaintEventArgseが必要です。 このコードは、次のアクションを実行します。

  • 赤い純色のブラシを作成します。

  • スプラインを定義する 4 点の配列を作成します。

  • 塗りつぶしモードを Windingに設定します。

  • テンションを 1.0 に設定します。

  • 画面上の曲線を塗りつぶします。

public:
   void FillClosedCurvePointFillModeTension( PaintEventArgs^ e )
   {
      // Create solid brush.
      SolidBrush^ redBrush = gcnew SolidBrush( Color::Red );

      // Create array of points for curve.
      Point point1 = Point(100,100);
      Point point2 = Point(200,50);
      Point point3 = Point(250,200);
      Point point4 = Point(50,150);
      array<Point>^ points = {point1,point2,point3,point4};

      // Set fill mode.
      FillMode newFillMode = FillMode::Winding;

      // Set tension.
      float tension = 1.0F;

      // Fill curve on screen.
      e->Graphics->FillClosedCurve( redBrush, points, newFillMode, tension );
   }
public void FillClosedCurvePointFillModeTension(PaintEventArgs e)
{
             
    // Create solid brush.
    SolidBrush redBrush = new SolidBrush(Color.Red);
             
    // Create array of points for curve.
    Point point1 = new Point(100, 100);
    Point point2 = new Point(200,  50);
    Point point3 = new Point(250, 200);
    Point point4 = new Point(50, 150);
    Point[] points = {point1, point2, point3, point4};
             
    // Set fill mode.
    FillMode newFillMode = FillMode.Winding;
             
    // Set tension.
    float tension = 1.0F;
             
    // Fill curve on screen.
    e.Graphics.FillClosedCurve(redBrush, points, newFillMode, tension);
}
Public Sub FillClosedCurvePointFillModeTension(ByVal e As PaintEventArgs)

    ' Create solid brush.
    Dim redBrush As New SolidBrush(Color.Red)

    ' Create array of points for curve.
    Dim point1 As New Point(100, 100)
    Dim point2 As New Point(200, 50)
    Dim point3 As New Point(250, 200)
    Dim point4 As New Point(50, 150)
    Dim points As Point() = {point1, point2, point3, point4}

    ' Set fill mode.
    Dim newFillMode As FillMode = FillMode.Winding

    ' Set tension.
    Dim tension As Single = 1.0F

    ' Fill curve on screen.
    e.Graphics.FillClosedCurve(redBrush, points, newFillMode, tension)
End Sub

注釈

このメソッドは、配列内の各ポイントを通過する閉じたカーディナル スプラインの内部を塗りつぶします。 最後の点が最初の点と一致しない場合は、最後の点から最初の点に曲線セグメントを追加して閉じます。

ポイントの配列には、少なくとも 4 つの Point 構造体が含まれている必要があります。

tension パラメータは、スプラインの形状を決定します。 tension パラメーターの値が 0.0F の場合、このメソッドは直線セグメントを描画して点を接続します。 通常、tension パラメーターは 1.0F 以下です。 1.0F を超える値では、通常とは異なる結果が生成されます。

適用対象

FillClosedCurve(Brush, PointF[], FillMode, Single)

ソース:
Graphics.cs
ソース:
Graphics.cs
ソース:
Graphics.cs
ソース:
Graphics.cs
ソース:
Graphics.cs

指定したフィル モードとテンションを使用して、PointF 構造の配列によって定義された閉じたカーディナル スプライン曲線の内部を塗りつぶします。

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

パラメーター

brush
Brush

フィルの特性を決定する Brush

points
PointF[]

スプラインを定義する PointF 構造体の配列。

fillmode
FillMode

曲線の塗りつぶし方法を決定する FillMode 列挙体のメンバー。

tension
Single

曲線の張力を指定する 0.0F 以上の値。

例外

brushnullです。

-又は-

pointsnullです。

次のコード例は Windows フォームで使用できるように設計されており、Paint イベント ハンドラーのパラメーターである PaintEventArgseが必要です。 このコードは、次のアクションを実行します。

  • 赤い純色のブラシを作成します。

  • スプラインを定義する 4 点の配列を作成します。

  • 塗りつぶしモードを Windingに設定します。

  • テンションを 1.0 に設定します。

  • 画面上の曲線を塗りつぶします。

public:
   void FillClosedCurvePointFFillModeTension( PaintEventArgs^ e )
   {
      // Create solid brush.
      SolidBrush^ redBrush = gcnew SolidBrush( Color::Red );

      // Create array of points for curve.
      PointF point1 = PointF(100.0F,100.0F);
      PointF point2 = PointF(200.0F,50.0F);
      PointF point3 = PointF(250.0F,200.0F);
      PointF point4 = PointF(50.0F,150.0F);
      array<PointF>^ points = {point1,point2,point3,point4};

      // Set fill mode.
      FillMode newFillMode = FillMode::Winding;

      // Set tension.
      float tension = 1.0F;

      // Fill curve on screen.
      e->Graphics->FillClosedCurve( redBrush, points, newFillMode, tension );
   }
public void FillClosedCurvePointFFillModeTension(PaintEventArgs e)
{
             
    // Create solid brush.
    SolidBrush redBrush = new SolidBrush(Color.Red);
             
    // Create array of points for curve.
    PointF point1 = new PointF(100.0F, 100.0F);
    PointF point2 = new PointF(200.0F,  50.0F);
    PointF point3 = new PointF(250.0F, 200.0F);
    PointF point4 = new PointF(50.0F, 150.0F);
    PointF[] points = {point1, point2, point3, point4};
             
    // Set fill mode.
    FillMode newFillMode = FillMode.Winding;
             
    // Set tension.
    float tension = 1.0F;
             
    // Fill curve on screen.
    e.Graphics.FillClosedCurve(redBrush, points, newFillMode, tension);
}
Public Sub FillClosedCurvePointFFillModeTension(ByVal e As PaintEventArgs)

    ' Create solid brush.
    Dim redBrush As New SolidBrush(Color.Red)

    ' Create array of points for curve.
    Dim point1 As New PointF(100.0F, 100.0F)
    Dim point2 As New PointF(200.0F, 50.0F)
    Dim point3 As New PointF(250.0F, 200.0F)
    Dim point4 As New PointF(50.0F, 150.0F)
    Dim points As PointF() = {point1, point2, point3, point4}

    ' Set fill mode.
    Dim newFillMode As FillMode = FillMode.Winding

    ' Set tension.
    Dim tension As Single = 1.0F

    ' Fill curve on screen.
    e.Graphics.FillClosedCurve(redBrush, points, newFillMode, tension)
End Sub

注釈

このメソッドは、配列内の各ポイントを通過する閉じたカーディナル スプラインの内部を塗りつぶします。 最後の点が最初の点と一致しない場合は、最後の点から最初の点に曲線セグメントを追加して閉じます。

ポイントの配列には、少なくとも 4 つの Point 構造体が含まれている必要があります。

tension パラメータは、スプラインの形状を決定します。 tension パラメーターの値が 0.0F の場合、このメソッドは直線セグメントを描画して点を接続します。 通常、tension パラメーターは 1.0F 以下です。 1.0F を超える値では、通常とは異なる結果が生成されます。

適用対象

FillClosedCurve(Brush, ReadOnlySpan<Point>, FillMode, Single)

ソース:
Graphics.cs
ソース:
Graphics.cs
public:
 void FillClosedCurve(System::Drawing::Brush ^ brush, ReadOnlySpan<System::Drawing::Point> points, System::Drawing::Drawing2D::FillMode fillmode, float tension);
public void FillClosedCurve (System.Drawing.Brush brush, ReadOnlySpan<System.Drawing.Point> points, System.Drawing.Drawing2D.FillMode fillmode, float tension);
member this.FillClosedCurve : System.Drawing.Brush * ReadOnlySpan<System.Drawing.Point> * System.Drawing.Drawing2D.FillMode * single -> unit
Public Sub FillClosedCurve (brush As Brush, points As ReadOnlySpan(Of Point), fillmode As FillMode, tension As Single)

パラメーター

brush
Brush
fillmode
FillMode
tension
Single

適用対象

FillClosedCurve(Brush, ReadOnlySpan<PointF>, FillMode, Single)

ソース:
Graphics.cs
ソース:
Graphics.cs
public:
 void FillClosedCurve(System::Drawing::Brush ^ brush, ReadOnlySpan<System::Drawing::PointF> points, System::Drawing::Drawing2D::FillMode fillmode, float tension);
public void FillClosedCurve (System.Drawing.Brush brush, ReadOnlySpan<System.Drawing.PointF> points, System.Drawing.Drawing2D.FillMode fillmode, float tension);
member this.FillClosedCurve : System.Drawing.Brush * ReadOnlySpan<System.Drawing.PointF> * System.Drawing.Drawing2D.FillMode * single -> unit
Public Sub FillClosedCurve (brush As Brush, points As ReadOnlySpan(Of PointF), fillmode As FillMode, tension As Single)

パラメーター

brush
Brush
fillmode
FillMode
tension
Single

適用対象