Graphics.DrawCurve 方法

定義

透過指定的 Point 結構陣列繪製基數曲線。

多載

DrawCurve(Pen, ReadOnlySpan<PointF>, Single)
DrawCurve(Pen, ReadOnlySpan<PointF>, Int32, Int32, Single)
DrawCurve(Pen, ReadOnlySpan<Point>, Int32, Int32, Single)
DrawCurve(Pen, PointF[], Int32, Int32, Single)

使用指定的緊張,透過指定的 PointF 結構陣列繪製基數曲線。 繪圖會從陣列的開頭開始位移。

DrawCurve(Pen, Point[], Int32, Int32, Single)

使用指定的緊張,透過指定的 Point 結構陣列繪製基數曲線。

DrawCurve(Pen, ReadOnlySpan<PointF>, Int32, Int32)
DrawCurve(Pen, PointF[], Int32, Int32)

透過指定的 PointF 結構陣列繪製基數曲線。 繪圖會從陣列的開頭開始位移。

DrawCurve(Pen, PointF[], Single)

使用指定的緊張,透過指定的 PointF 結構陣列繪製基數曲線。

DrawCurve(Pen, Point[], Single)

使用指定的緊張,透過指定的 Point 結構陣列繪製基數曲線。

DrawCurve(Pen, ReadOnlySpan<PointF>)
DrawCurve(Pen, ReadOnlySpan<Point>)
DrawCurve(Pen, PointF[])

透過指定的 PointF 結構陣列繪製基數曲線。

DrawCurve(Pen, Point[])

透過指定的 Point 結構陣列繪製基數曲線。

DrawCurve(Pen, ReadOnlySpan<Point>, Single)

DrawCurve(Pen, ReadOnlySpan<PointF>, Single)

來源:
Graphics.cs
來源:
Graphics.cs
C#
public void DrawCurve (System.Drawing.Pen pen, ReadOnlySpan<System.Drawing.PointF> points, float tension);

參數

pen
Pen
tension
Single

適用於

.NET 9 和 Windows Desktop 9
產品 版本
.NET 9
Windows Desktop 9

DrawCurve(Pen, ReadOnlySpan<PointF>, Int32, Int32, Single)

來源:
Graphics.cs
來源:
Graphics.cs
C#
public void DrawCurve (System.Drawing.Pen pen, ReadOnlySpan<System.Drawing.PointF> points, int offset, int numberOfSegments, float tension);

參數

pen
Pen
offset
Int32
numberOfSegments
Int32
tension
Single

適用於

.NET 9 和 Windows Desktop 9
產品 版本
.NET 9
Windows Desktop 9

DrawCurve(Pen, ReadOnlySpan<Point>, Int32, Int32, Single)

來源:
Graphics.cs
來源:
Graphics.cs
C#
public void DrawCurve (System.Drawing.Pen pen, ReadOnlySpan<System.Drawing.Point> points, int offset, int numberOfSegments, float tension);

參數

pen
Pen
offset
Int32
numberOfSegments
Int32
tension
Single

適用於

.NET 9 和 Windows Desktop 9
產品 版本
.NET 9
Windows Desktop 9

DrawCurve(Pen, PointF[], Int32, Int32, Single)

來源:
Graphics.cs
來源:
Graphics.cs
來源:
Graphics.cs
來源:
Graphics.cs
來源:
Graphics.cs

使用指定的緊張,透過指定的 PointF 結構陣列繪製基數曲線。 繪圖會從陣列的開頭開始位移。

C#
public void DrawCurve (System.Drawing.Pen pen, System.Drawing.PointF[] points, int offset, int numberOfSegments, float tension);

參數

pen
Pen

Pen,決定曲線的色彩、寬度和樣式。

points
PointF[]

定義曲線之 PointF 結構的數位。

offset
Int32

points 參數陣列中第一個專案到曲線中起點的位移。

numberOfSegments
Int32

要包含在曲線中之起點之後的線段數目。

tension
Single

大於或等於 0.0F 的值,指定曲線的緊張度。

例外狀況

pen null

-或-

points null

範例

下列程式代碼範例是專為搭配 Windows Forms 使用而設計,而且需要 PaintEventArgse,這是 Paint 事件處理程式的參數。 程式代碼會執行下列動作:

  • 建立紅色和綠色的畫筆。

  • 建立七個點來定義曲線。

  • 在七點之間繪製六條紅色直線,形成不完整的多邊形。

  • 定義起點位移和區段數目。

  • 定義緊張。

  • 繪製一條開放式綠色曲線(從第三點開始)到最後五個點。

方法會將緊張度設定為1.0。

C#
private void DrawCurvePointFSegmentTension(PaintEventArgs e)
{

    // Create pens.
    Pen redPen = new Pen(Color.Red, 3);
    Pen greenPen = new Pen(Color.Green, 3);

    // Create points that define curve.
    PointF point1 = new PointF(50.0F, 50.0F);
    PointF point2 = new PointF(100.0F, 25.0F);
    PointF point3 = new PointF(200.0F, 5.0F);
    PointF point4 = new PointF(250.0F, 50.0F);
    PointF point5 = new PointF(300.0F, 100.0F);
    PointF point6 = new PointF(350.0F, 200.0F);
    PointF point7 = new PointF(250.0F, 250.0F);
    PointF[] curvePoints = {point1, point2, point3, point4, point5, point6, point7};

    // Draw lines between original points to screen.
    e.Graphics.DrawLines(redPen, curvePoints);

    // Create offset, number of segments, and tension.
    int offset = 2;
    int numSegments = 4;
    float tension = 1.0F;

    // Draw curve to screen.
    e.Graphics.DrawCurve(greenPen, curvePoints, offset, numSegments, tension);
}

備註

這個方法會繪製通過陣列中每個點的基數曲線。

點陣列必須至少包含三個 PointF 結構,才能繪製曲線。

offset 參數的值會指定要在數位中略過的項目數目。 略過元素後面的第一個專案代表曲線的起點。

numberOfSegments 參數的值會指定要在曲線中繪製的起點之後的線段數目。 numberOfSegments 參數的值必須至少為 1。 offset 參數的值加上 numberOfSegments 參數的值必須小於 points 參數陣列中的元素數目。

tension 參數會決定曲線的形狀。 如果 tension 參數的值是 0.0F,這個方法會繪製直線線段來連接點。 通常,tension 參數小於或等於1.0F。 超過 1.0F 的值會產生不尋常的結果。

適用於

.NET 9 和其他版本
產品 版本
.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

DrawCurve(Pen, Point[], Int32, Int32, Single)

來源:
Graphics.cs
來源:
Graphics.cs
來源:
Graphics.cs
來源:
Graphics.cs
來源:
Graphics.cs

使用指定的緊張,透過指定的 Point 結構陣列繪製基數曲線。

C#
public void DrawCurve (System.Drawing.Pen pen, System.Drawing.Point[] points, int offset, int numberOfSegments, float tension);

參數

pen
Pen

Pen,決定曲線的色彩、寬度和樣式。

points
Point[]

定義曲線之 Point 結構的數位。

offset
Int32

points 參數陣列中第一個專案到曲線中起點的位移。

numberOfSegments
Int32

要包含在曲線中之起點之後的線段數目。

tension
Single

大於或等於 0.0F 的值,指定曲線的緊張度。

例外狀況

pen null

-或-

points null

範例

下列程式代碼範例是專為搭配 Windows Forms 使用而設計,而且需要 PaintEventArgse,這是 Paint 事件處理程式的參數。 程式代碼會執行下列動作:

  • 建立紅色和綠色的畫筆。

  • 建立七個點來定義曲線。

  • 在七點之間繪製六條紅色直線,形成不完整的多邊形。

  • 定義起點位移和區段數目。

  • 定義緊張。

  • 繪製一條開放式綠色曲線(從第三點開始)到最後五個點。

方法會將緊張度設定為1.0。

C#
private void DrawCurvePointSegmentTension(PaintEventArgs e)
{

    // Create pens.
    Pen redPen = new Pen(Color.Red, 3);
    Pen greenPen = new Pen(Color.Green, 3);

    // Create points that define curve.
    Point point1 = new Point(50, 50);
    Point point2 = new Point(100, 25);
    Point point3 = new Point(200, 5);
    Point point4 = new Point(250, 50);
    Point point5 = new Point(300, 100);
    Point point6 = new Point(350, 200);
    Point point7 = new Point(250, 250);
    Point[] curvePoints = {point1, point2, point3, point4, point5, point6, point7};

    // Draw lines between original points to screen.
    e.Graphics.DrawLines(redPen, curvePoints);

    // Create offset, number of segments, and tension.
    int offset = 2;
    int numSegments = 4;
    float tension = 1.0F;

    // Draw curve to screen.
    e.Graphics.DrawCurve(greenPen, curvePoints, offset, numSegments, tension);
}

備註

這個方法會繪製通過陣列中每個點的基數曲線。

點陣列必須至少包含三個 Point 結構,才能繪製曲線。

offset 參數的值會指定要在數位中略過的項目數目。 略過元素後面的第一個專案代表曲線的起點。

numberOfSegments 參數的值會指定要在曲線中繪製的起點之後的線段數目。 numberOfSegments 參數的值必須至少為 1。 offset 參數的值加上 numberOfSegments 參數的值必須小於 points 參數陣列中的元素數目。

tension 參數會決定曲線的形狀。 如果 tension 參數的值是 0.0F,這個方法會繪製直線線段來連接點。 通常,tension 參數小於或等於1.0F。 超過 1.0F 的值會產生不尋常的結果。

適用於

.NET 9 和其他版本
產品 版本
.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

DrawCurve(Pen, ReadOnlySpan<PointF>, Int32, Int32)

來源:
Graphics.cs
來源:
Graphics.cs
C#
public void DrawCurve (System.Drawing.Pen pen, ReadOnlySpan<System.Drawing.PointF> points, int offset, int numberOfSegments);

參數

pen
Pen
offset
Int32
numberOfSegments
Int32

適用於

.NET 9 和 Windows Desktop 9
產品 版本
.NET 9
Windows Desktop 9

DrawCurve(Pen, PointF[], Int32, Int32)

來源:
Graphics.cs
來源:
Graphics.cs
來源:
Graphics.cs
來源:
Graphics.cs
來源:
Graphics.cs

透過指定的 PointF 結構陣列繪製基數曲線。 繪圖會從陣列的開頭開始位移。

C#
public void DrawCurve (System.Drawing.Pen pen, System.Drawing.PointF[] points, int offset, int numberOfSegments);

參數

pen
Pen

Pen,決定曲線的色彩、寬度和樣式。

points
PointF[]

定義曲線之 PointF 結構的數位。

offset
Int32

points 參數陣列中第一個專案到曲線中起點的位移。

numberOfSegments
Int32

要包含在曲線中之起點之後的線段數目。

例外狀況

pen null

-或-

points null

範例

下列程式代碼範例是專為搭配 Windows Forms 使用而設計,而且需要 PaintEventArgse,這是 Paint 事件處理程式的參數。 程式代碼會執行下列動作:

  • 建立紅色和綠色的畫筆。

  • 建立七個點來定義曲線。

  • 在七點之間繪製六條紅色直線,形成不完整的多邊形。

  • 定義起點位移和區段數目。

  • 繪製一條開放式綠色曲線(從第三點開始)到最後五個點。

方法會使用預設的緊張度 0.5。

C#
private void DrawCurvePointFSegments(PaintEventArgs e)
{

    // Create pens.
    Pen redPen = new Pen(Color.Red, 3);
    Pen greenPen = new Pen(Color.Green, 3);

    // Create points that define curve.
    PointF point1 = new PointF(50.0F, 50.0F);
    PointF point2 = new PointF(100.0F, 25.0F);
    PointF point3 = new PointF(200.0F, 5.0F);
    PointF point4 = new PointF(250.0F, 50.0F);
    PointF point5 = new PointF(300.0F, 100.0F);
    PointF point6 = new PointF(350.0F, 200.0F);
    PointF point7 = new PointF(250.0F, 250.0F);
    PointF[] curvePoints = {point1, point2, point3, point4, point5, point6, point7};

    // Draw lines between original points to screen.
    e.Graphics.DrawLines(redPen, curvePoints);

    // Create offset and number of segments.
    int offset = 2;
    int numSegments = 4;

    // Draw curve to screen.
    e.Graphics.DrawCurve(greenPen, curvePoints, offset, numSegments);
}

備註

這個方法會繪製通過陣列中每個點的基數曲線。

點陣列必須至少包含三個 PointF 結構,才能繪製曲線。

offset 參數的值會指定要在數位中略過的項目數目。 略過元素後面的第一個專案代表曲線的起點。

numberOfSegments 參數的值會指定要在曲線中繪製的起點之後的線段數目。 numberOfSegments 參數的值必須至少為 1。 offset 參數的值加上 numberOfSegments 參數的值必須小於 points 參數陣列中的元素數目。

此方法使用預設的緊張度 0.5。

適用於

.NET 9 和其他版本
產品 版本
.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

DrawCurve(Pen, PointF[], Single)

來源:
Graphics.cs
來源:
Graphics.cs
來源:
Graphics.cs
來源:
Graphics.cs
來源:
Graphics.cs

使用指定的緊張,透過指定的 PointF 結構陣列繪製基數曲線。

C#
public void DrawCurve (System.Drawing.Pen pen, System.Drawing.PointF[] points, float tension);

參數

pen
Pen

Pen,決定曲線的色彩、寬度和樣式。

points
PointF[]

PointF 結構的陣列,表示定義曲線的點。

tension
Single

大於或等於 0.0F 的值,指定曲線的緊張度。

例外狀況

pen null

-或-

points null

範例

下列程式代碼範例是專為搭配 Windows Forms 使用而設計,而且需要 PaintEventArgse,這是 Paint 事件處理程式的參數。 程式代碼會執行下列動作:

  • 建立紅色和綠色的畫筆。

  • 建立七個點來定義曲線。

  • 在七點之間繪製六條紅色直線,形成不完整的多邊形。

  • 建立緊張設定。

  • 透過七點繪製一條開啟的綠色封閉曲線。

方法會使用 1.0 的緊張。

C#
private void DrawCurvePointFTension(PaintEventArgs e)
{

    // Create pens.
    Pen redPen = new Pen(Color.Red, 3);
    Pen greenPen = new Pen(Color.Green, 3);

    // Create points that define curve.
    PointF point1 = new PointF(50.0F, 50.0F);
    PointF point2 = new PointF(100.0F, 25.0F);
    PointF point3 = new PointF(200.0F, 5.0F);
    PointF point4 = new PointF(250.0F, 50.0F);
    PointF point5 = new PointF(300.0F, 100.0F);
    PointF point6 = new PointF(350.0F, 200.0F);
    PointF point7 = new PointF(250.0F, 250.0F);
    PointF[] curvePoints = {point1, point2, point3, point4, point5, point6, point7};

    // Draw lines between original points to screen.
    e.Graphics.DrawLines(redPen, curvePoints);

    // Create tension.
    float tension = 1.0F;

    // Draw curve to screen.
    e.Graphics.DrawCurve(greenPen, curvePoints, tension);
}

備註

這個方法會繪製通過陣列中每個點的基數曲線。

點陣列必須至少包含三個 PointF 結構,才能繪製曲線。

tension 參數會決定曲線的形狀。 如果 tension 參數的值是 0.0F,這個方法會繪製直線線段來連接點。 通常,tension 參數小於或等於1.0F。 超過 1.0F 的值會產生不尋常的結果。

適用於

.NET 9 和其他版本
產品 版本
.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

DrawCurve(Pen, Point[], Single)

來源:
Graphics.cs
來源:
Graphics.cs
來源:
Graphics.cs
來源:
Graphics.cs
來源:
Graphics.cs

使用指定的緊張,透過指定的 Point 結構陣列繪製基數曲線。

C#
public void DrawCurve (System.Drawing.Pen pen, System.Drawing.Point[] points, float tension);

參數

pen
Pen

Pen,決定曲線的色彩、寬度和樣式。

points
Point[]

定義曲線之 Point 結構的數位。

tension
Single

大於或等於 0.0F 的值,指定曲線的緊張度。

例外狀況

pen null

-或-

points null

範例

下列程式代碼範例是專為搭配 Windows Forms 使用而設計,而且需要 PaintEventArgse,這是 Paint 事件處理程式的參數。 程式代碼會執行下列動作:

  • 建立紅色和綠色的畫筆。

  • 建立七個點來定義曲線。

  • 在七點之間繪製六條紅色直線,形成不完整的多邊形。

  • 建立緊張設定。

  • 透過七點繪製一條開啟的綠色封閉曲線。

方法會使用 1.0 的緊張。

C#
private void DrawCurvePointTension(PaintEventArgs e)
{

    // Create pens.
    Pen redPen = new Pen(Color.Red, 3);
    Pen greenPen = new Pen(Color.Green, 3);

    // Create points that define curve.
    Point point1 = new Point(50, 50);
    Point point2 = new Point(100, 25);
    Point point3 = new Point(200, 5);
    Point point4 = new Point(250, 50);
    Point point5 = new Point(300, 100);
    Point point6 = new Point(350, 200);
    Point point7 = new Point(250, 250);
    Point[] curvePoints = {point1, point2, point3, point4, point5, point6, point7};

    // Draw lines between original points to screen.
    e.Graphics.DrawLines(redPen, curvePoints);

    // Create tension.
    float tension = 1.0F;

    // Draw curve to screen.
    e.Graphics.DrawCurve(greenPen, curvePoints, tension);
}

備註

這個方法會繪製通過陣列中每個點的基數曲線。

點陣列必須至少包含三個 Point 結構,才能繪製曲線。

tension 參數會決定曲線的形狀。 如果 tension 參數的值是 0.0F,這個方法會繪製直線線段來連接點。 通常,tension 參數小於或等於1.0F。 超過 1.0F 的值會產生不尋常的結果。

適用於

.NET 9 和其他版本
產品 版本
.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

DrawCurve(Pen, ReadOnlySpan<PointF>)

來源:
Graphics.cs
來源:
Graphics.cs
C#
public void DrawCurve (System.Drawing.Pen pen, scoped ReadOnlySpan<System.Drawing.PointF> points);

參數

pen
Pen

適用於

.NET 9 和 Windows Desktop 9
產品 版本
.NET 9
Windows Desktop 9

DrawCurve(Pen, ReadOnlySpan<Point>)

來源:
Graphics.cs
來源:
Graphics.cs
C#
public void DrawCurve (System.Drawing.Pen pen, scoped ReadOnlySpan<System.Drawing.Point> points);

參數

pen
Pen

適用於

.NET 9 和 Windows Desktop 9
產品 版本
.NET 9
Windows Desktop 9

DrawCurve(Pen, PointF[])

來源:
Graphics.cs
來源:
Graphics.cs
來源:
Graphics.cs
來源:
Graphics.cs
來源:
Graphics.cs

透過指定的 PointF 結構陣列繪製基數曲線。

C#
public void DrawCurve (System.Drawing.Pen pen, System.Drawing.PointF[] points);
C#
public void DrawCurve (System.Drawing.Pen pen, params System.Drawing.PointF[] points);

參數

pen
Pen

Pen,決定曲線的色彩、寬度和樣式。

points
PointF[]

定義曲線之 PointF 結構的數位。

例外狀況

pen null

-或-

points null

範例

下列程式代碼範例是專為搭配 Windows Forms 使用而設計,而且需要 PaintEventArgse,這是 Paint 事件處理程式的參數。 程式代碼會執行下列動作:

  • 建立紅色和綠色的畫筆。

  • 建立七個點來定義曲線。

  • 在七點之間繪製六條紅色直線,形成不完整的多邊形。

  • 透過七點繪製一條開放式綠色曲線。

方法會使用預設的緊張度 0.5。

C#
private void DrawCurvePointF(PaintEventArgs e)
{

    // Create pens.
    Pen redPen = new Pen(Color.Red, 3);
    Pen greenPen = new Pen(Color.Green, 3);

    // Create points that define curve.
    PointF point1 = new PointF(50.0F, 50.0F);
    PointF point2 = new PointF(100.0F, 25.0F);
    PointF point3 = new PointF(200.0F, 5.0F);
    PointF point4 = new PointF(250.0F, 50.0F);
    PointF point5 = new PointF(300.0F, 100.0F);
    PointF point6 = new PointF(350.0F, 200.0F);
    PointF point7 = new PointF(250.0F, 250.0F);
    PointF[] curvePoints = {point1, point2, point3, point4, point5, point6, point7};

    // Draw lines between original points to screen.
    e.Graphics.DrawLines(redPen, curvePoints);

    // Draw curve to screen.
    e.Graphics.DrawCurve(greenPen, curvePoints);
}

備註

這個方法會繪製通過陣列中每個點的基數曲線。

點陣列必須至少包含三個 PointF 結構,才能繪製曲線。

此方法使用預設的緊張度 0.5。

適用於

.NET 9 和其他版本
產品 版本
.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

DrawCurve(Pen, Point[])

來源:
Graphics.cs
來源:
Graphics.cs
來源:
Graphics.cs
來源:
Graphics.cs
來源:
Graphics.cs

透過指定的 Point 結構陣列繪製基數曲線。

C#
public void DrawCurve (System.Drawing.Pen pen, System.Drawing.Point[] points);
C#
public void DrawCurve (System.Drawing.Pen pen, params System.Drawing.Point[] points);

參數

pen
Pen

Pen,決定曲線的色彩、寬度和高度。

points
Point[]

定義曲線之 Point 結構的數位。

例外狀況

pen null

-或-

points null

範例

下列程式代碼範例是專為搭配 Windows Forms 使用而設計,而且需要 PaintEventArgse,這是 Paint 事件處理程式的參數。 程式代碼會執行下列動作:

  • 建立紅色和綠色的畫筆。

  • 建立七個點來定義曲線。

  • 在七點之間繪製六條紅色直線,形成不完整的多邊形。

  • 透過七點繪製一條開放式綠色曲線。

方法會使用預設的緊張度 0.5。

C#
private void DrawCurvePoint(PaintEventArgs e)
{

    // Create pens.
    Pen redPen = new Pen(Color.Red, 3);
    Pen greenPen = new Pen(Color.Green, 3);

    // Create points that define curve.
    Point point1 = new Point(50, 50);
    Point point2 = new Point(100, 25);
    Point point3 = new Point(200, 5);
    Point point4 = new Point(250, 50);
    Point point5 = new Point(300, 100);
    Point point6 = new Point(350, 200);
    Point point7 = new Point(250, 250);
    Point[] curvePoints = {point1, point2, point3, point4, point5, point6, point7};

    // Draw lines between original points to screen.
    e.Graphics.DrawLines(redPen, curvePoints);

    // Draw curve to screen.
    e.Graphics.DrawCurve(greenPen, curvePoints);
}

備註

這個方法會繪製通過陣列中每個點的基數曲線。

點陣列必須至少包含三個 Point 結構,才能繪製曲線。

此方法使用預設的緊張度 0.5。

適用於

.NET 9 和其他版本
產品 版本
.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

DrawCurve(Pen, ReadOnlySpan<Point>, Single)

來源:
Graphics.cs
來源:
Graphics.cs
C#
public void DrawCurve (System.Drawing.Pen pen, ReadOnlySpan<System.Drawing.Point> points, float tension);

參數

pen
Pen
tension
Single

適用於

.NET 9 和 Windows Desktop 9
產品 版本
.NET 9
Windows Desktop 9