Graphics.FillClosedCurve Graphics.FillClosedCurve Graphics.FillClosedCurve Method

Definición

Rellena el interior de una curva spline cardinal cerrada, definida por una matriz de estructuras Point.Fills the interior of a closed cardinal spline curve defined by an array of Point structures.

Sobrecargas

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

Rellena el interior de una curva spline cardinal cerrada, definida por una matriz de estructuras 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[])

Rellena el interior de una curva spline cardinal cerrada, definida por una matriz de estructuras 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)

Rellena el interior de una curva spline cardinal cerrada, definida por una matriz de estructuras Point, utilizando el modo de relleno especificado.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)

Rellena el interior de una curva spline cardinal cerrada, definida por una matriz de estructuras PointF, utilizando el modo de relleno especificado.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)

Rellena el interior de una curva spline cardinal cerrada, definida por una matriz de estructuras Point, utilizando la tensión y el modo de relleno especificados.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)

Rellena el interior de una curva spline cardinal cerrada, definida por una matriz de estructuras PointF, utilizando la tensión y el modo de relleno especificados.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[])

Rellena el interior de una curva spline cardinal cerrada, definida por una matriz de estructuras 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

Parámetros

brush
Brush Brush Brush

Brush que determina las características del relleno.Brush that determines the characteristics of the fill.

points
Point[]

Matriz de estructuras Point que definen la curva spline.Array of Point structures that define the spline.

Excepciones

brush es null.brush is null.

O bien-or- points es null.points is null.

Ejemplos

El siguiente ejemplo de código está diseñado para su uso con Windows Forms y requiere PaintEventArgs e, que Paint es un parámetro del controlador de eventos.The following code example is designed for use with Windows Forms, and it requires PaintEventArgse, which is a parameter of the Paint event handler. El código realiza las siguientes acciones:The code performs the following actions:

  • Crea un pincel rojo sólido.Creates a solid red brush.

  • Crea una matriz de cuatro puntos para definir una spline.Creates an array of four points to define a spline.

  • Rellena la curva en la pantalla.Fills the curve on the screen.

La curva tiene una tensión predeterminada de 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

Comentarios

Este método rellena el interior de una curva spline cardinal cerrada que atraviesa cada punto de la matriz.This method fills the interior of a closed cardinal spline that passes through each point in the array. Si el último punto no coincide con el primer punto, se agrega un segmento de curva adicional desde el último punto hasta el primer punto para cerrarlo.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 matriz de puntos debe contener al menos cuatro Point estructuras.The array of points must contain at least four Point structures.

Este método usa una tensión predeterminada de 0,5.This method uses a default tension of 0.5.

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

Rellena el interior de una curva spline cardinal cerrada, definida por una matriz de estructuras 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

Parámetros

brush
Brush Brush Brush

Brush que determina las características del relleno.Brush that determines the characteristics of the fill.

points
PointF[]

Matriz de estructuras PointF que definen la curva spline.Array of PointF structures that define the spline.

Excepciones

brush es null.brush is null.

o bien-or- points es null.points is null.

Ejemplos

El siguiente ejemplo de código está diseñado para su uso con Windows Forms y requiere PaintEventArgs e, que Paint es un parámetro del controlador de eventos.The following code example is designed for use with Windows Forms, and it requires PaintEventArgse, which is a parameter of the Paint event handler. El código realiza las siguientes acciones:The code performs the following actions:

  • Crea un pincel rojo sólido.Creates a solid red brush.

  • Crea una matriz de cuatro puntos para definir una spline.Creates an array of four points to define a spline.

  • Rellena la curva en la pantalla.Fills the curve on the screen.

La curva tiene una tensión predeterminada de 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

Comentarios

Este método rellena el interior de una curva spline cardinal cerrada que atraviesa cada punto de la matriz.This method fills the interior of a closed cardinal spline that passes through each point in the array. Si el último punto no coincide con el primer punto, se agrega un segmento de curva adicional desde el último punto hasta el primer punto para cerrarlo.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 matriz de puntos debe contener al menos cuatro PointF estructuras.The array of points must contain at least four PointF structures.

Este método usa una tensión predeterminada de 0,5.This method uses a default tension of 0.5.

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

Rellena el interior de una curva spline cardinal cerrada, definida por una matriz de estructuras Point, utilizando el modo de relleno especificado.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

Parámetros

brush
Brush Brush Brush

Brush que determina las características del relleno.Brush that determines the characteristics of the fill.

points
Point[]

Matriz de estructuras Point que definen la curva spline.Array of Point structures that define the spline.

fillmode
FillMode FillMode FillMode

Miembro de la enumeración FillMode que determina cómo se rellena la curva.Member of the FillMode enumeration that determines how the curve is filled.

Excepciones

brush es null.brush is null.

O bien-or- points es null.points is null.

Ejemplos

El siguiente ejemplo de código está diseñado para su uso con Windows Forms y requiere PaintEventArgs e, que Paint es un parámetro del controlador de eventos.The following code example is designed for use with Windows Forms, and it requires PaintEventArgse, which is a parameter of the Paint event handler. El código realiza las siguientes acciones:The code performs the following actions:

  • Crea un pincel rojo sólido.Creates a solid red brush.

  • Crea una matriz de cuatro puntos para definir una spline.Creates an array of four points to define a spline.

  • Establece el modo de relleno Windingen.Sets the fill mode to Winding.

  • Rellena la curva en la pantalla.Fills the curve on the screen.

La curva tiene una tensión predeterminada de 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

Comentarios

Este método rellena el interior de una curva spline cardinal cerrada que atraviesa cada punto de la matriz.This method fills the interior of a closed cardinal spline that passes through each point in the array. Si el último punto no coincide con el primer punto, se agrega un segmento de curva adicional desde el último punto hasta el primer punto para cerrarlo.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 matriz de puntos debe contener al menos cuatro Point estructuras.The array of points must contain at least four Point structures.

Este método usa una tensión predeterminada de 0,5.This method uses a default tension of 0.5.

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

Rellena el interior de una curva spline cardinal cerrada, definida por una matriz de estructuras PointF, utilizando el modo de relleno especificado.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

Parámetros

brush
Brush Brush Brush

Brush que determina las características del relleno.Brush that determines the characteristics of the fill.

points
PointF[]

Matriz de estructuras PointF que definen la curva spline.Array of PointF structures that define the spline.

fillmode
FillMode FillMode FillMode

Miembro de la enumeración FillMode que determina cómo se rellena la curva.Member of the FillMode enumeration that determines how the curve is filled.

Excepciones

brush es null.brush is null.

O bien-or- points es null.points is null.

Ejemplos

El siguiente ejemplo de código está diseñado para su uso con Windows Forms y requiere PaintEventArgs e, que Paint es un parámetro del controlador de eventos.The following code example is designed for use with Windows Forms, and it requires PaintEventArgse, which is a parameter of the Paint event handler. El código realiza las siguientes acciones:The code performs the following actions:

  • Crea un pincel rojo sólido.Creates a solid red brush.

  • Crea una matriz de cuatro puntos para definir una spline.Creates an array of four points to define a spline.

  • Establece el modo de relleno Windingen.Sets the fill mode to Winding.

  • Rellena la curva en la pantalla.Fills the curve on the screen.

La curva tiene una tensión predeterminada de 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

Comentarios

Este método rellena el interior de una curva spline cardinal cerrada que atraviesa cada punto de la matriz.This method fills the interior of a closed cardinal spline that passes through each point in the array. Si el último punto no coincide con el primer punto, se agrega un segmento de curva adicional desde el último punto hasta el primer punto para cerrarlo.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 matriz de puntos debe contener al menos cuatro Point estructuras.The array of points must contain at least four Point structures.

Este método usa una tensión predeterminada de 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)

Rellena el interior de una curva spline cardinal cerrada, definida por una matriz de estructuras Point, utilizando la tensión y el modo de relleno especificados.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

Parámetros

brush
Brush Brush Brush

Brush que determina las características del relleno.Brush that determines the characteristics of the fill.

points
Point[]

Matriz de estructuras Point que definen la curva spline.Array of Point structures that define the spline.

fillmode
FillMode FillMode FillMode

Miembro de la enumeración FillMode que determina cómo se rellena la curva.Member of the FillMode enumeration that determines how the curve is filled.

tension
Single Single Single

Valor mayor o igual que 0,0F que especifica la tensión de la curva.Value greater than or equal to 0.0F that specifies the tension of the curve.

Excepciones

brush es null.brush is null.

O bien-or- points es null.points is null.

Ejemplos

El siguiente ejemplo de código está diseñado para su uso con Windows Forms y requiere PaintEventArgs e, que Paint es un parámetro del controlador de eventos.The following code example is designed for use with Windows Forms, and it requires PaintEventArgse, which is a parameter of the Paint event handler. El código realiza las siguientes acciones:The code performs the following actions:

  • Crea un pincel rojo sólido.Creates a solid red brush.

  • Crea una matriz de cuatro puntos para definir una spline.Creates an array of four points to define a spline.

  • Establece el modo de relleno Windingen.Sets the fill mode to Winding.

  • Establece la tensión en 1,0.Sets the tension to 1.0.

  • Rellena la curva en la pantalla.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

Comentarios

Este método rellena el interior de una curva spline cardinal cerrada que atraviesa cada punto de la matriz.This method fills the interior of a closed cardinal spline that passes through each point in the array. Si el último punto no coincide con el primer punto, se agrega un segmento de curva adicional desde el último punto hasta el primer punto para cerrarlo.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 matriz de puntos debe contener al menos cuatro Point estructuras.The array of points must contain at least four Point structures.

El tension parámetro determina la forma de la curva spline.The tension parameter determines the shape of the spline. Si el valor del tension parámetro es 0,0 f, este método dibuja segmentos de línea recta para conectar los puntos.If the value of the tension parameter is 0.0F, this method draws straight line segments to connect the points. Normalmente, el tension parámetro es menor o igual que 1,0 f.Usually, the tension parameter is less than or equal to 1.0F. Los valores superiores a 1.0 F producen resultados poco habituales.Values over 1.0F produce unusual results.

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

Rellena el interior de una curva spline cardinal cerrada, definida por una matriz de estructuras PointF, utilizando la tensión y el modo de relleno especificados.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

Parámetros

brush
Brush Brush Brush

Brush que determina las características del relleno.A Brush that determines the characteristics of the fill.

points
PointF[]

Matriz de estructuras PointF que definen la curva spline.Array of PointF structures that define the spline.

fillmode
FillMode FillMode FillMode

Miembro de la enumeración FillMode que determina cómo se rellena la curva.Member of the FillMode enumeration that determines how the curve is filled.

tension
Single Single Single

Valor mayor o igual que 0,0F que especifica la tensión de la curva.Value greater than or equal to 0.0F that specifies the tension of the curve.

Excepciones

brush es null.brush is null.

O bien-or- points es null.points is null.

Ejemplos

El siguiente ejemplo de código está diseñado para su uso con Windows Forms y requiere PaintEventArgs e, que Paint es un parámetro del controlador de eventos.The following code example is designed for use with Windows Forms, and it requires PaintEventArgse, which is a parameter of the Paint event handler. El código realiza las siguientes acciones:The code performs the following actions:

  • Crea un pincel rojo sólido.Creates a solid red brush.

  • Crea una matriz de cuatro puntos para definir una spline.Creates an array of four points to define a spline.

  • Establece el modo de relleno Windingen.Sets the fill mode to Winding.

  • Establece la tensión en 1,0.Sets the tension to 1.0.

  • Rellena la curva en la pantalla.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

Comentarios

Este método rellena el interior de una curva spline cardinal cerrada que atraviesa cada punto de la matriz.This method fills the interior of a closed cardinal spline that passes through each point in the array. Si el último punto no coincide con el primer punto, se agrega un segmento de curva adicional desde el último punto hasta el primer punto para cerrarlo.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 matriz de puntos debe contener al menos cuatro Point estructuras.The array of points must contain at least four Point structures.

El tension parámetro determina la forma de la curva spline.The tension parameter determines the shape of the spline. Si el valor del tension parámetro es 0,0 f, este método dibuja segmentos de línea recta para conectar los puntos.If the value of the tension parameter is 0.0F, this method draws straight line segments to connect the points. Normalmente, el tension parámetro es menor o igual que 1,0 f.Usually, the tension parameter is less than or equal to 1.0F. Los valores superiores a 1.0 F producen resultados poco habituales.Values over 1.0F produce unusual results.

Se aplica a