Graphics.FillClosedCurve Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Remplit l'intérieur d'une spline cardinale fermée définie par un tableau de structures Point.
Surcharges
FillClosedCurve(Brush, Point[]) |
Remplit l'intérieur d'une spline cardinale fermée définie par un tableau de structures Point. |
FillClosedCurve(Brush, PointF[]) |
Remplit l'intérieur d'une spline cardinale fermée définie par un tableau de structures PointF. |
FillClosedCurve(Brush, ReadOnlySpan<Point>) | |
FillClosedCurve(Brush, ReadOnlySpan<PointF>) | |
FillClosedCurve(Brush, Point[], FillMode) |
Remplit l'intérieur d'une spline cardinale fermée définie par un tableau de structures Point, en utilisant le mode de remplissage spécifié. |
FillClosedCurve(Brush, PointF[], FillMode) |
Remplit l'intérieur d'une spline cardinale fermée définie par un tableau de structures PointF, en utilisant le mode de remplissage spécifié. |
FillClosedCurve(Brush, ReadOnlySpan<Point>, FillMode) | |
FillClosedCurve(Brush, ReadOnlySpan<PointF>, FillMode) | |
FillClosedCurve(Brush, Point[], FillMode, Single) |
Remplit l'intérieur d'une spline cardinale fermée définie par un tableau de structures Point, en utilisant le mode de remplissage et la tension spécifiés. |
FillClosedCurve(Brush, PointF[], FillMode, Single) |
Remplit l'intérieur d'une spline cardinale fermée définie par un tableau de structures PointF, en utilisant le mode de remplissage et la tension spécifiés. |
FillClosedCurve(Brush, ReadOnlySpan<Point>, FillMode, Single) | |
FillClosedCurve(Brush, ReadOnlySpan<PointF>, FillMode, Single) |
FillClosedCurve(Brush, Point[])
- Source:
- Graphics.cs
- Source:
- Graphics.cs
- Source:
- Graphics.cs
Remplit l'intérieur d'une spline cardinale fermée définie par un tableau de structures 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())
Paramètres
Exceptions
Exemples
L’exemple de code suivant est conçu pour être utilisé avec Windows Forms et nécessite PaintEventArgse
, qui est un paramètre du Paint gestionnaire d’événements. Le code effectue les actions suivantes :
Crée un pinceau rouge uni.
Crée un tableau de quatre points pour définir une spline.
Remplit la courbe à l’écran.
La courbe a une tension par défaut de 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
Remarques
Cette méthode remplit l’intérieur d’une spline cardinale fermée qui passe à travers chaque point du tableau. Si le dernier point ne correspond pas au premier point, un segment de courbe supplémentaire est ajouté du dernier point au premier point pour le fermer.
Le tableau de points doit contenir au moins quatre Point structures.
Cette méthode utilise une tension par défaut de 0,5.
S’applique à
FillClosedCurve(Brush, PointF[])
- Source:
- Graphics.cs
- Source:
- Graphics.cs
- Source:
- Graphics.cs
Remplit l'intérieur d'une spline cardinale fermée définie par un tableau de structures 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())
Paramètres
Exceptions
Exemples
L’exemple de code suivant est conçu pour être utilisé avec Windows Forms et nécessite PaintEventArgse
, qui est un paramètre du Paint gestionnaire d’événements. Le code effectue les actions suivantes :
Crée un pinceau rouge uni.
Crée un tableau de quatre points pour définir une spline.
Remplit la courbe à l’écran.
La courbe a une tension par défaut de 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
Remarques
Cette méthode remplit l’intérieur d’une spline cardinale fermée qui passe à travers chaque point du tableau. Si le dernier point ne correspond pas au premier point, un segment de courbe supplémentaire est ajouté du dernier point au premier point pour le fermer.
Le tableau de points doit contenir au moins quatre PointF structures.
Cette méthode utilise une tension par défaut de 0,5.
S’applique à
FillClosedCurve(Brush, ReadOnlySpan<Point>)
- Source:
- 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))
Paramètres
- brush
- Brush
- points
- ReadOnlySpan<Point>
S’applique à
FillClosedCurve(Brush, ReadOnlySpan<PointF>)
- Source:
- 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))
Paramètres
- brush
- Brush
- points
- ReadOnlySpan<PointF>
S’applique à
FillClosedCurve(Brush, Point[], FillMode)
- Source:
- Graphics.cs
- Source:
- Graphics.cs
- Source:
- Graphics.cs
Remplit l'intérieur d'une spline cardinale fermée définie par un tableau de structures Point, en utilisant le mode de remplissage spécifié.
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)
Paramètres
- fillmode
- FillMode
Membre de l'énumération FillMode qui détermine le mode de remplissage de la courbe.
Exceptions
Exemples
L’exemple de code suivant est conçu pour être utilisé avec Windows Forms et nécessite PaintEventArgse
, qui est un paramètre du Paint gestionnaire d’événements. Le code effectue les actions suivantes :
Crée un pinceau rouge uni.
Crée un tableau de quatre points pour définir une spline.
Définit le mode de remplissage sur Winding.
Remplit la courbe à l’écran.
La courbe a une tension par défaut de 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
Remarques
Cette méthode remplit l’intérieur d’une spline cardinale fermée qui passe à travers chaque point du tableau. Si le dernier point ne correspond pas au premier point, un segment de courbe supplémentaire est ajouté du dernier point au premier point pour le fermer.
Le tableau de points doit contenir au moins quatre Point structures.
Cette méthode utilise une tension par défaut de 0,5.
S’applique à
FillClosedCurve(Brush, PointF[], FillMode)
- Source:
- Graphics.cs
- Source:
- Graphics.cs
- Source:
- Graphics.cs
Remplit l'intérieur d'une spline cardinale fermée définie par un tableau de structures PointF, en utilisant le mode de remplissage spécifié.
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)
Paramètres
- fillmode
- FillMode
Membre de l'énumération FillMode qui détermine le mode de remplissage de la courbe.
Exceptions
Exemples
L’exemple de code suivant est conçu pour être utilisé avec Windows Forms et nécessite PaintEventArgse
, qui est un paramètre du Paint gestionnaire d’événements. Le code effectue les actions suivantes :
Crée un pinceau rouge uni.
Crée un tableau de quatre points pour définir une spline.
Définit le mode de remplissage sur Winding.
Remplit la courbe à l’écran.
La courbe a une tension par défaut de 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
Remarques
Cette méthode remplit l’intérieur d’une spline cardinale fermée qui passe à travers chaque point du tableau. Si le dernier point ne correspond pas au premier point, un segment de courbe supplémentaire est ajouté du dernier point au premier point pour le fermer.
Le tableau de points doit contenir au moins quatre Point structures.
Cette méthode utilise une tension par défaut de 0,5.
S’applique à
FillClosedCurve(Brush, ReadOnlySpan<Point>, FillMode)
- Source:
- 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)
Paramètres
- brush
- Brush
- points
- ReadOnlySpan<Point>
- fillmode
- FillMode
S’applique à
FillClosedCurve(Brush, ReadOnlySpan<PointF>, FillMode)
- Source:
- 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)
Paramètres
- brush
- Brush
- points
- ReadOnlySpan<PointF>
- fillmode
- FillMode
S’applique à
FillClosedCurve(Brush, Point[], FillMode, Single)
- Source:
- Graphics.cs
- Source:
- Graphics.cs
- Source:
- Graphics.cs
Remplit l'intérieur d'une spline cardinale fermée définie par un tableau de structures Point, en utilisant le mode de remplissage et la tension spécifiés.
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)
Paramètres
- fillmode
- FillMode
Membre de l'énumération FillMode qui détermine le mode de remplissage de la courbe.
- tension
- Single
Valeur supérieure ou égale à 0,0 F qui spécifie la tension de la courbe.
Exceptions
Exemples
L’exemple de code suivant est conçu pour être utilisé avec Windows Forms et nécessite PaintEventArgse
, qui est un paramètre du Paint gestionnaire d’événements. Le code effectue les actions suivantes :
Crée un pinceau rouge uni.
Crée un tableau de quatre points pour définir une spline.
Définit le mode de remplissage sur Winding.
Définit la tension sur 1.0.
Remplit la courbe à l’écran.
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
Remarques
Cette méthode remplit l’intérieur d’une spline cardinale fermée qui passe à travers chaque point du tableau. Si le dernier point ne correspond pas au premier point, un segment de courbe supplémentaire est ajouté du dernier point au premier point pour le fermer.
Le tableau de points doit contenir au moins quatre Point structures.
Le tension
paramètre détermine la forme de la spline. Si la valeur du tension
paramètre est 0,0F, cette méthode dessine des segments de ligne droite pour connecter les points. En règle générale, le tension
paramètre est inférieur ou égal à 1,0F. Les valeurs supérieures à 1,0 F produisent des résultats inhabituels.
S’applique à
FillClosedCurve(Brush, PointF[], FillMode, Single)
- Source:
- Graphics.cs
- Source:
- Graphics.cs
- Source:
- Graphics.cs
Remplit l'intérieur d'une spline cardinale fermée définie par un tableau de structures PointF, en utilisant le mode de remplissage et la tension spécifiés.
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)
Paramètres
- fillmode
- FillMode
Membre de l'énumération FillMode qui détermine le mode de remplissage de la courbe.
- tension
- Single
Valeur supérieure ou égale à 0,0 F qui spécifie la tension de la courbe.
Exceptions
Exemples
L’exemple de code suivant est conçu pour être utilisé avec Windows Forms et nécessite PaintEventArgse
, qui est un paramètre du Paint gestionnaire d’événements. Le code effectue les actions suivantes :
Crée un pinceau rouge unie.
Crée un tableau de quatre points pour définir une spline.
Définit le mode de remplissage sur Winding.
Définit la tension sur 1.0.
Remplit la courbe à l’écran.
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
Remarques
Cette méthode remplit l’intérieur d’une spline cardinale fermée qui traverse chaque point du tableau. Si le dernier point ne correspond pas au premier point, un segment de courbe supplémentaire est ajouté du dernier point au premier point pour le fermer.
Le tableau de points doit contenir au moins quatre Point structures.
Le tension
paramètre détermine la forme de la spline. Si la valeur du tension
paramètre est 0,0F, cette méthode dessine des segments de ligne droite pour connecter les points. En règle générale, le tension
paramètre est inférieur ou égal à 1,0F. Les valeurs supérieures à 1,0 F produisent des résultats inhabituels.
S’applique à
FillClosedCurve(Brush, ReadOnlySpan<Point>, FillMode, Single)
- Source:
- 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)
Paramètres
- brush
- Brush
- points
- ReadOnlySpan<Point>
- fillmode
- FillMode
- tension
- Single
S’applique à
FillClosedCurve(Brush, ReadOnlySpan<PointF>, FillMode, Single)
- Source:
- 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)
Paramètres
- brush
- Brush
- points
- ReadOnlySpan<PointF>
- fillmode
- FillMode
- tension
- Single
S’applique à
Commentaires
https://aka.ms/ContentUserFeedback.
Bientôt disponible : Tout au long de 2024, nous allons supprimer progressivement GitHub Issues comme mécanisme de commentaires pour le contenu et le remplacer par un nouveau système de commentaires. Pour plus d’informations, consultezEnvoyer et afficher des commentaires pour