Graphics.FillClosedCurve Graphics.FillClosedCurve Graphics.FillClosedCurve Method

Definizione

Riempie l'area interna di una curva spline di tipo Cardinal chiusa definita da una matrice di strutture Point.Fills the interior of a closed cardinal spline curve defined by an array of Point structures.

Overload

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

Riempie l'area interna di una curva spline di tipo Cardinal chiusa definita da una matrice di strutture Point.Fills the interior of a closed cardinal spline curve defined by an array of Point structures.

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

Riempie l'area interna di una curva spline di tipo Cardinal chiusa definita da una matrice di strutture PointF.Fills the interior of a closed cardinal spline curve defined by an array of PointF structures.

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

Utilizzando la modalità di riempimento specificata, riempie l'area interna di una curva spline di tipo Cardinal chiusa definita da una matrice di strutture Point.Fills the interior of a closed cardinal spline curve defined by an array of Point structures using the specified fill mode.

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

Utilizzando la modalità di riempimento specificata, riempie l'area interna di una curva spline di tipo Cardinal chiusa definita da una matrice di strutture PointF.Fills the interior of a closed cardinal spline curve defined by an array of PointF structures using the specified fill mode.

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

Utilizzando modalità di riempimento e tensione specificate, riempie l'area interna di una curva spline di tipo Cardinal chiusa definita da una matrice di strutture Point.Fills the interior of a closed cardinal spline curve defined by an array of Point structures using the specified fill mode and tension.

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

Utilizzando modalità di riempimento e tensione specificate, riempie l'area interna di una curva spline di tipo Cardinal chiusa definita da una matrice di strutture PointF.Fills the interior of a closed cardinal spline curve defined by an array of PointF structures using the specified fill mode and tension.

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

Riempie l'area interna di una curva spline di tipo Cardinal chiusa definita da una matrice di strutture Point.Fills the interior of a closed cardinal spline curve defined by an array of Point structures.

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

Parametri

brush
Brush Brush Brush

Oggetto Brush che determina le caratteristiche del riempimento.Brush that determines the characteristics of the fill.

points
Point[]

Matrice di strutture Point che definiscono la curva spline.Array of Point structures that define the spline.

Eccezioni

brush è null.brush is null.

-oppure--or- points è null.points is null.

Esempi

L'esempio di codice seguente è progettato per l'uso con Windows Forms e richiede PaintEventArgs e, che Paint è un parametro del gestore eventi.The following code example is designed for use with Windows Forms, and it requires PaintEventArgse, which is a parameter of the Paint event handler. Nel codice vengono eseguite le seguenti azioni:The code performs the following actions:

  • Crea un pennello rosso a tinta unita.Creates a solid red brush.

  • Crea una matrice di quattro punti per definire una spline.Creates an array of four points to define a spline.

  • Riempie la curva sullo schermo.Fills the curve on the screen.

La curva ha una tensione predefinita di 0,5.The curve has a default tension of 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

Commenti

Questo metodo riempie l'area interna di una spline di Cardinal chiusa che passa attraverso ogni punto della matrice.This method fills the interior of a closed cardinal spline that passes through each point in the array. Se l'ultimo punto non corrisponde al primo punto, viene aggiunto un segmento di curva aggiuntivo dall'ultimo punto al primo punto per chiuderlo.If the last point does not match the first point, an additional curve segment is added from the last point to the first point to close it.

La matrice di punti deve contenere almeno quattro Point strutture.The array of points must contain at least four Point structures.

Questo metodo usa una tensione predefinita di 0,5.This method uses a default tension of 0.5.

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

Riempie l'area interna di una curva spline di tipo Cardinal chiusa definita da una matrice di strutture PointF.Fills the interior of a closed cardinal spline curve defined by an array of PointF structures.

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

Parametri

brush
Brush Brush Brush

Oggetto Brush che determina le caratteristiche del riempimento.Brush that determines the characteristics of the fill.

points
PointF[]

Matrice di strutture PointF che definiscono la curva spline.Array of PointF structures that define the spline.

Eccezioni

brush è null.brush is null.

-oppure--or- points è null.points is null.

Esempi

L'esempio di codice seguente è progettato per l'uso con Windows Forms e richiede PaintEventArgs e, che Paint è un parametro del gestore eventi.The following code example is designed for use with Windows Forms, and it requires PaintEventArgse, which is a parameter of the Paint event handler. Nel codice vengono eseguite le seguenti azioni:The code performs the following actions:

  • Crea un pennello rosso a tinta unita.Creates a solid red brush.

  • Crea una matrice di quattro punti per definire una spline.Creates an array of four points to define a spline.

  • Riempie la curva sullo schermo.Fills the curve on the screen.

La curva ha una tensione predefinita di 0,5.The curve has a default tension of 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

Commenti

Questo metodo riempie l'area interna di una spline di Cardinal chiusa che passa attraverso ogni punto della matrice.This method fills the interior of a closed cardinal spline that passes through each point in the array. Se l'ultimo punto non corrisponde al primo punto, viene aggiunto un segmento di curva aggiuntivo dall'ultimo punto al primo punto per chiuderlo.If the last point does not match the first point, an additional curve segment is added from the last point to the first point to close it.

La matrice di punti deve contenere almeno quattro PointF strutture.The array of points must contain at least four PointF structures.

Questo metodo usa una tensione predefinita di 0,5.This method uses a default tension of 0.5.

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

Utilizzando la modalità di riempimento specificata, riempie l'area interna di una curva spline di tipo Cardinal chiusa definita da una matrice di strutture Point.Fills the interior of a closed cardinal spline curve defined by an array of Point structures using the specified fill mode.

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

Parametri

brush
Brush Brush Brush

Oggetto Brush che determina le caratteristiche del riempimento.Brush that determines the characteristics of the fill.

points
Point[]

Matrice di strutture Point che definiscono la curva spline.Array of Point structures that define the spline.

fillmode
FillMode FillMode FillMode

Membro dell'enumerazione FillMode che determina la modalità di riempimento della curva.Member of the FillMode enumeration that determines how the curve is filled.

Eccezioni

brush è null.brush is null.

In alternativa-or- points è null.points is null.

Esempi

L'esempio di codice seguente è progettato per l'uso con Windows Forms e richiede PaintEventArgs e, che Paint è un parametro del gestore eventi.The following code example is designed for use with Windows Forms, and it requires PaintEventArgse, which is a parameter of the Paint event handler. Nel codice vengono eseguite le seguenti azioni:The code performs the following actions:

  • Crea un pennello rosso a tinta unita.Creates a solid red brush.

  • Crea una matrice di quattro punti per definire una spline.Creates an array of four points to define a spline.

  • Imposta la modalità di riempimento Windingsu.Sets the fill mode to Winding.

  • Riempie la curva sullo schermo.Fills the curve on the screen.

La curva ha una tensione predefinita di 0,5.The curve has a default tension of 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

Commenti

Questo metodo riempie l'area interna di una spline di Cardinal chiusa che passa attraverso ogni punto della matrice.This method fills the interior of a closed cardinal spline that passes through each point in the array. Se l'ultimo punto non corrisponde al primo punto, viene aggiunto un segmento di curva aggiuntivo dall'ultimo punto al primo punto per chiuderlo.If the last point does not match the first point, an additional curve segment is added from the last point to the first point to close it.

La matrice di punti deve contenere almeno quattro Point strutture.The array of points must contain at least four Point structures.

Questo metodo usa una tensione predefinita di 0,5.This method uses a default tension of 0.5.

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

Utilizzando la modalità di riempimento specificata, riempie l'area interna di una curva spline di tipo Cardinal chiusa definita da una matrice di strutture PointF.Fills the interior of a closed cardinal spline curve defined by an array of PointF structures using the specified fill mode.

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

Parametri

brush
Brush Brush Brush

Oggetto Brush che determina le caratteristiche del riempimento.Brush that determines the characteristics of the fill.

points
PointF[]

Matrice di strutture PointF che definiscono la curva spline.Array of PointF structures that define the spline.

fillmode
FillMode FillMode FillMode

Membro dell'enumerazione FillMode che determina la modalità di riempimento della curva.Member of the FillMode enumeration that determines how the curve is filled.

Eccezioni

brush è null.brush is null.

In alternativa-or- points è null.points is null.

Esempi

L'esempio di codice seguente è progettato per l'uso con Windows Forms e richiede PaintEventArgs e, che Paint è un parametro del gestore eventi.The following code example is designed for use with Windows Forms, and it requires PaintEventArgse, which is a parameter of the Paint event handler. Nel codice vengono eseguite le seguenti azioni:The code performs the following actions:

  • Crea un pennello rosso a tinta unita.Creates a solid red brush.

  • Crea una matrice di quattro punti per definire una spline.Creates an array of four points to define a spline.

  • Imposta la modalità di riempimento Windingsu.Sets the fill mode to Winding.

  • Riempie la curva sullo schermo.Fills the curve on the screen.

La curva ha una tensione predefinita di 0,5.The curve has a default tension of 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

Commenti

Questo metodo riempie l'area interna di una spline di Cardinal chiusa che passa attraverso ogni punto della matrice.This method fills the interior of a closed cardinal spline that passes through each point in the array. Se l'ultimo punto non corrisponde al primo punto, viene aggiunto un segmento di curva aggiuntivo dall'ultimo punto al primo punto per chiuderlo.If the last point does not match the first point, an additional curve segment is added from the last point to the first point to close it.

La matrice di punti deve contenere almeno quattro Point strutture.The array of points must contain at least four Point structures.

Questo metodo usa una tensione predefinita di 0,5.This method uses a default tension of 0.5.

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

Utilizzando modalità di riempimento e tensione specificate, riempie l'area interna di una curva spline di tipo Cardinal chiusa definita da una matrice di strutture Point.Fills the interior of a closed cardinal spline curve defined by an array of Point structures using the specified fill mode and tension.

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

Parametri

brush
Brush Brush Brush

Oggetto Brush che determina le caratteristiche del riempimento.Brush that determines the characteristics of the fill.

points
Point[]

Matrice di strutture Point che definiscono la curva spline.Array of Point structures that define the spline.

fillmode
FillMode FillMode FillMode

Membro dell'enumerazione FillMode che determina la modalità di riempimento della curva.Member of the FillMode enumeration that determines how the curve is filled.

tension
Single Single Single

Valore superiore o uguale a 0,0 F che specifica la tensione della curva.Value greater than or equal to 0.0F that specifies the tension of the curve.

Eccezioni

brush è null.brush is null.

-oppure--or- points è null.points is null.

Esempi

L'esempio di codice seguente è progettato per l'uso con Windows Forms e richiede PaintEventArgs e, che Paint è un parametro del gestore eventi.The following code example is designed for use with Windows Forms, and it requires PaintEventArgse, which is a parameter of the Paint event handler. Nel codice vengono eseguite le seguenti azioni:The code performs the following actions:

  • Crea un pennello rosso a tinta unita.Creates a solid red brush.

  • Crea una matrice di quattro punti per definire una spline.Creates an array of four points to define a spline.

  • Imposta la modalità di riempimento Windingsu.Sets the fill mode to Winding.

  • Imposta la tensione su 1,0.Sets the tension to 1.0.

  • Riempie la curva sullo schermo.Fills the curve on the screen.

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

Commenti

Questo metodo riempie l'area interna di una spline di Cardinal chiusa che passa attraverso ogni punto della matrice.This method fills the interior of a closed cardinal spline that passes through each point in the array. Se l'ultimo punto non corrisponde al primo punto, viene aggiunto un segmento di curva aggiuntivo dall'ultimo punto al primo punto per chiuderlo.If the last point does not match the first point, an additional curve segment is added from the last point to the first point to close it.

La matrice di punti deve contenere almeno quattro Point strutture.The array of points must contain at least four Point structures.

Il tension parametro determina la forma della spline.The tension parameter determines the shape of the spline. Se il valore del tension parametro è 0,0 f, questo metodo disegna segmenti di linea retta per la connessione dei punti.If the value of the tension parameter is 0.0F, this method draws straight line segments to connect the points. In genere, tension il parametro è minore o uguale a 1,0 f.Usually, the tension parameter is less than or equal to 1.0F. I valori superiori a 1,0 F producono risultati insoliti.Values over 1.0F produce unusual results.

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

Utilizzando modalità di riempimento e tensione specificate, riempie l'area interna di una curva spline di tipo Cardinal chiusa definita da una matrice di strutture PointF.Fills the interior of a closed cardinal spline curve defined by an array of PointF structures using the specified fill mode and tension.

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

Parametri

brush
Brush Brush Brush

Oggetto Brush che determina le caratteristiche del riempimento.A Brush that determines the characteristics of the fill.

points
PointF[]

Matrice di strutture PointF che definiscono la curva spline.Array of PointF structures that define the spline.

fillmode
FillMode FillMode FillMode

Membro dell'enumerazione FillMode che determina la modalità di riempimento della curva.Member of the FillMode enumeration that determines how the curve is filled.

tension
Single Single Single

Valore superiore o uguale a 0,0 F che specifica la tensione della curva.Value greater than or equal to 0.0F that specifies the tension of the curve.

Eccezioni

brush è null.brush is null.

-oppure--or- points è null.points is null.

Esempi

L'esempio di codice seguente è progettato per l'uso con Windows Forms e richiede PaintEventArgs e, che Paint è un parametro del gestore eventi.The following code example is designed for use with Windows Forms, and it requires PaintEventArgse, which is a parameter of the Paint event handler. Nel codice vengono eseguite le seguenti azioni:The code performs the following actions:

  • Crea un pennello rosso a tinta unita.Creates a solid red brush.

  • Crea una matrice di quattro punti per definire una spline.Creates an array of four points to define a spline.

  • Imposta la modalità di riempimento Windingsu.Sets the fill mode to Winding.

  • Imposta la tensione su 1,0.Sets the tension to 1.0.

  • Riempie la curva sullo schermo.Fills the curve on the screen.

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

Commenti

Questo metodo riempie l'area interna di una spline di Cardinal chiusa che passa attraverso ogni punto della matrice.This method fills the interior of a closed cardinal spline that passes through each point in the array. Se l'ultimo punto non corrisponde al primo punto, viene aggiunto un segmento di curva aggiuntivo dall'ultimo punto al primo punto per chiuderlo.If the last point does not match the first point, an additional curve segment is added from the last point to the first point to close it.

La matrice di punti deve contenere almeno quattro Point strutture.The array of points must contain at least four Point structures.

Il tension parametro determina la forma della spline.The tension parameter determines the shape of the spline. Se il valore del tension parametro è 0,0 f, questo metodo disegna segmenti di linea retta per la connessione dei punti.If the value of the tension parameter is 0.0F, this method draws straight line segments to connect the points. In genere, tension il parametro è minore o uguale a 1,0 f.Usually, the tension parameter is less than or equal to 1.0F. I valori superiori a 1,0 F producono risultati insoliti.Values over 1.0F produce unusual results.

Si applica a