GraphicsPath.AddBeziers Metodo
In questo articolo
Importante
Alcune informazioni sono relative alla release non definitiva del prodotto, che potrebbe subire modifiche significative prima della release definitiva. Microsoft non riconosce alcuna garanzia, espressa o implicita, in merito alle informazioni qui fornite.
Aggiunge una sequenza di curve di Bézier cubiche collegate alla figura corrente.
| AddBeziers(ReadOnlySpan<PointF>) | |
| AddBeziers(ReadOnlySpan<Point>) | |
| AddBeziers(Point[]) |
Aggiunge una sequenza di curve di Bézier cubiche collegate alla figura corrente. |
| AddBeziers(PointF[]) |
Aggiunge una sequenza di curve di Bézier cubiche collegate alla figura corrente. |
- Origine:
- GraphicsPath.cs
- Origine:
- GraphicsPath.cs
public:
void AddBeziers(ReadOnlySpan<System::Drawing::PointF> points);
public void AddBeziers (scoped ReadOnlySpan<System.Drawing.PointF> points);
member this.AddBeziers : ReadOnlySpan<System.Drawing.PointF> -> unit
Public Sub AddBeziers (points As ReadOnlySpan(Of PointF))
Parametri
- points
- ReadOnlySpan<PointF>
Si applica a
.NET 9 e Windows Desktop 9
| Prodotto | Versioni |
|---|---|
| .NET | 9 |
| Windows Desktop | 9 |
- Origine:
- GraphicsPath.cs
- Origine:
- GraphicsPath.cs
public:
void AddBeziers(ReadOnlySpan<System::Drawing::Point> points);
public void AddBeziers (scoped ReadOnlySpan<System.Drawing.Point> points);
member this.AddBeziers : ReadOnlySpan<System.Drawing.Point> -> unit
Public Sub AddBeziers (points As ReadOnlySpan(Of Point))
Parametri
- points
- ReadOnlySpan<Point>
Si applica a
.NET 9 e Windows Desktop 9
| Prodotto | Versioni |
|---|---|
| .NET | 9 |
| Windows Desktop | 9 |
- Origine:
- GraphicsPath.cs
- Origine:
- GraphicsPath.cs
- Origine:
- GraphicsPath.cs
- Origine:
- GraphicsPath.cs
- Origine:
- GraphicsPath.cs
Aggiunge una sequenza di curve di Bézier cubiche collegate alla figura corrente.
public:
void AddBeziers(... cli::array <System::Drawing::Point> ^ points);
public:
void AddBeziers(cli::array <System::Drawing::Point> ^ points);
public void AddBeziers (params System.Drawing.Point[] points);
public void AddBeziers (System.Drawing.Point[] points);
member this.AddBeziers : System.Drawing.Point[] -> unit
Public Sub AddBeziers (ParamArray points As Point())
Public Sub AddBeziers (points As Point())
Parametri
Esempio
L'esempio di codice seguente è progettato per l'uso con Windows Form e richiede PaintEventArgse, un oggetto evento OnPaint. Il codice esegue le azioni seguenti:
Crea una matrice di sette punti (che rappresenta due curve di Bézier collegate).
Crea un percorso e aggiunge la serie di punti della curva di Bézier al percorso.
Disegna il percorso dello schermo.
private:
void AddBeziersExample( PaintEventArgs^ e )
{
// Adds two Bezier curves.
array<Point>^ myArray = {Point(20,100),Point(40,75),Point(60,125),Point(80,100),Point(100,50),Point(120,150),Point(140,100)};
// Create the path and add the curves.
GraphicsPath^ myPath = gcnew GraphicsPath;
myPath->AddBeziers( myArray );
// Draw the path to the screen.
Pen^ myPen = gcnew Pen( Color::Black,2.0f );
e->Graphics->DrawPath( myPen, myPath );
}
private void AddBeziersExample(PaintEventArgs e)
{
// Adds two Bezier curves.
Point[] myArray =
{
new Point(20, 100),
new Point(40, 75),
new Point(60, 125),
new Point(80, 100),
new Point(100, 50),
new Point(120, 150),
new Point(140, 100)
};
// Create the path and add the curves.
GraphicsPath myPath = new GraphicsPath();
myPath.AddBeziers(myArray);
// Draw the path to the screen.
Pen myPen = new Pen(Color.Black, 2);
e.Graphics.DrawPath(myPen, myPath);
}
Public Sub AddBeziersExample(ByVal e As PaintEventArgs)
' Adds two Bezier curves.
Dim myArray As Point() = {New Point(20, 100), New Point(40, 75), _
New Point(60, 125), New Point(80, 100), New Point(100, 50), _
New Point(120, 150), New Point(140, 100)}
Dim myPath As New GraphicsPath
myPath.AddBeziers(myArray)
Dim myPen As New Pen(Color.Black, 2)
e.Graphics.DrawPath(myPen, myPath)
End Sub
Commenti
Il parametro points specifica una matrice di endpoint e punti di controllo delle curve connesse. La prima curva viene costruita dal primo punto al quarto punto della matrice points usando il secondo e il terzo punto come punti di controllo. Oltre all'endpoint della curva precedente, ogni curva successiva nella sequenza richiede esattamente tre punti: i due punti successivi nella sequenza sono punti di controllo e il terzo è l'endpoint per la curva aggiunta.
Se nella figura sono presenti linee o curve precedenti, viene aggiunta una linea per connettere l'endpoint del segmento precedente al punto iniziale della prima curva cubica nella sequenza.
Si applica a
.NET 9 e altre versioni
| Prodotto | Versioni |
|---|---|
| .NET | 6, 7, 8, 9 |
| .NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
| .NET Standard | 2.0 |
| Windows Desktop | 3.0, 3.1, 5, 6, 7, 8, 9 |
- Origine:
- GraphicsPath.cs
- Origine:
- GraphicsPath.cs
- Origine:
- GraphicsPath.cs
- Origine:
- GraphicsPath.cs
- Origine:
- GraphicsPath.cs
Aggiunge una sequenza di curve di Bézier cubiche collegate alla figura corrente.
public:
void AddBeziers(cli::array <System::Drawing::PointF> ^ points);
public:
void AddBeziers(... cli::array <System::Drawing::PointF> ^ points);
public void AddBeziers (System.Drawing.PointF[] points);
public void AddBeziers (params System.Drawing.PointF[] points);
member this.AddBeziers : System.Drawing.PointF[] -> unit
Public Sub AddBeziers (points As PointF())
Public Sub AddBeziers (ParamArray points As PointF())
Parametri
Esempio
Per un esempio, vedere:
Commenti
Il parametro points specifica una matrice di endpoint e punti di controllo delle curve connesse. La prima curva viene costruita dal primo punto al quarto punto della matrice points usando il secondo e il terzo punto come punti di controllo. Oltre all'endpoint della curva precedente, ogni curva successiva nella sequenza richiede esattamente tre punti: i due punti successivi nella sequenza sono punti di controllo e il terzo è l'endpoint per la curva aggiunta.
Se nella figura sono presenti linee o curve precedenti, viene aggiunta una linea per connettere l'endpoint del segmento precedente al punto iniziale della prima curva cubica nella sequenza.
Si applica a
.NET 9 e altre versioni
| Prodotto | Versioni |
|---|---|
| .NET | 6, 7, 8, 9 |
| .NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
| .NET Standard | 2.0 |
| Windows Desktop | 3.0, 3.1, 5, 6, 7, 8, 9 |