Share via


Graphics.DrawCurve Yöntem

Tanım

Belirtilen yapı dizisi aracılığıyla bir kardinal eğrisi çizer Point .

Aşırı Yüklemeler

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)

Belirtilen gerilimi kullanarak belirli bir yapı dizisi PointF boyunca kardinal bir eğri çizer. Çizim, dizinin başından itibaren uzaklığı başlatır.

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

Belirtilen gerilimi kullanarak belirli bir yapı dizisi Point boyunca kardinal bir eğri çizer.

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

Belirtilen bir yapı dizisi aracılığıyla kardinal bir eğri çizer PointF . Çizim, dizinin başından itibaren uzaklığı başlatır.

DrawCurve(Pen, PointF[], Single)

Belirtilen gerilimi kullanarak belirli bir yapı dizisi PointF boyunca kardinal bir eğri çizer.

DrawCurve(Pen, Point[], Single)

Belirtilen gerilimi kullanarak belirli bir yapı dizisi Point boyunca kardinal bir eğri çizer.

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

Belirtilen bir yapı dizisi aracılığıyla kardinal bir eğri çizer PointF .

DrawCurve(Pen, Point[])

Belirtilen bir yapı dizisi aracılığıyla kardinal bir eğri çizer Point .

DrawCurve(Pen, ReadOnlySpan<Point>, Single)

DrawCurve(Pen, ReadOnlySpan<PointF>, Single)

Kaynak:
Graphics.cs
public:
 void DrawCurve(System::Drawing::Pen ^ pen, ReadOnlySpan<System::Drawing::PointF> points, float tension);
public void DrawCurve (System.Drawing.Pen pen, ReadOnlySpan<System.Drawing.PointF> points, float tension);
member this.DrawCurve : System.Drawing.Pen * ReadOnlySpan<System.Drawing.PointF> * single -> unit
Public Sub DrawCurve (pen As Pen, points As ReadOnlySpan(Of PointF), tension As Single)

Parametreler

pen
Pen
tension
Single

Şunlara uygulanır

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

Kaynak:
Graphics.cs
public:
 void DrawCurve(System::Drawing::Pen ^ pen, ReadOnlySpan<System::Drawing::PointF> points, int offset, int numberOfSegments, float tension);
public void DrawCurve (System.Drawing.Pen pen, ReadOnlySpan<System.Drawing.PointF> points, int offset, int numberOfSegments, float tension);
member this.DrawCurve : System.Drawing.Pen * ReadOnlySpan<System.Drawing.PointF> * int * int * single -> unit
Public Sub DrawCurve (pen As Pen, points As ReadOnlySpan(Of PointF), offset As Integer, numberOfSegments As Integer, tension As Single)

Parametreler

pen
Pen
offset
Int32
numberOfSegments
Int32
tension
Single

Şunlara uygulanır

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

Kaynak:
Graphics.cs
public:
 void DrawCurve(System::Drawing::Pen ^ pen, ReadOnlySpan<System::Drawing::Point> points, int offset, int numberOfSegments, float tension);
public void DrawCurve (System.Drawing.Pen pen, ReadOnlySpan<System.Drawing.Point> points, int offset, int numberOfSegments, float tension);
member this.DrawCurve : System.Drawing.Pen * ReadOnlySpan<System.Drawing.Point> * int * int * single -> unit
Public Sub DrawCurve (pen As Pen, points As ReadOnlySpan(Of Point), offset As Integer, numberOfSegments As Integer, tension As Single)

Parametreler

pen
Pen
offset
Int32
numberOfSegments
Int32
tension
Single

Şunlara uygulanır

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

Kaynak:
Graphics.cs
Kaynak:
Graphics.cs
Kaynak:
Graphics.cs

Belirtilen gerilimi kullanarak belirli bir yapı dizisi PointF boyunca kardinal bir eğri çizer. Çizim, dizinin başından itibaren uzaklığı başlatır.

public:
 void DrawCurve(System::Drawing::Pen ^ pen, cli::array <System::Drawing::PointF> ^ points, int offset, int numberOfSegments, float tension);
public void DrawCurve (System.Drawing.Pen pen, System.Drawing.PointF[] points, int offset, int numberOfSegments, float tension);
member this.DrawCurve : System.Drawing.Pen * System.Drawing.PointF[] * int * int * single -> unit
Public Sub DrawCurve (pen As Pen, points As PointF(), offset As Integer, numberOfSegments As Integer, tension As Single)

Parametreler

pen
Pen

Pen eğrinin rengini, genişliğini ve stilini belirler.

points
PointF[]

Eğriyi PointF tanımlayan yapı dizisi.

offset
Int32

Parametre dizisindeki ilk öğeden eğrideki points başlangıç noktasına uzaklık.

numberOfSegments
Int32

Başlangıç noktasından sonra eğriye eklenecek segmentlerin sayısı.

tension
Single

Eğrinin gerilimini belirten 0,0F'den büyük veya 0,0F'ye eşit değer.

Özel durumlar

pen, null değeridir.

-veya-

points, null değeridir.

Örnekler

Aşağıdaki kod örneği, Windows Forms ile kullanılmak üzere tasarlanmıştır ve olay işleyicisinin Paint bir parametresi olan gerektirir.PaintEventArgse Kod aşağıdaki eylemleri gerçekleştirir:

  • Kırmızı ve yeşil kalemler oluşturur.

  • Eğri tanımlamak için yedi nokta oluşturur.

  • Tamamlanmamış bir çokgen oluşturmak için yedi nokta arasına altı kırmızı düz çizgi çizer.

  • Başlangıç noktası uzaklığını ve segment sayısını tanımlar.

  • Gerilimi tanımlar.

  • Son beş nokta boyunca açık bir yeşil eğri (üçüncü noktadan başlayarak) çizer.

yöntemi gerilimi 1.0 olarak ayarlar.

private:
   void DrawCurvePointFSegmentTension( PaintEventArgs^ e )
   {
      // Create pens.
      Pen^ redPen = gcnew Pen( Color::Red,3.0f );
      Pen^ greenPen = gcnew Pen( Color::Green,3.0f );

      // Create points that define curve.
      PointF point1 = PointF(50.0F,50.0F);
      PointF point2 = PointF(100.0F,25.0F);
      PointF point3 = PointF(200.0F,5.0F);
      PointF point4 = PointF(250.0F,50.0F);
      PointF point5 = PointF(300.0F,100.0F);
      PointF point6 = PointF(350.0F,200.0F);
      PointF point7 = PointF(250.0F,250.0F);
      array<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 );
   }
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);
}
Private Sub DrawCurvePointFSegmentTension(ByVal e As PaintEventArgs)

    ' Create pens.
    Dim redPen As New Pen(Color.Red, 3)
    Dim greenPen As New Pen(Color.Green, 3)

    ' Create points that define curve.
    Dim point1 As New PointF(50.0F, 50.0F)
    Dim point2 As New PointF(100.0F, 25.0F)
    Dim point3 As New PointF(200.0F, 5.0F)
    Dim point4 As New PointF(250.0F, 50.0F)
    Dim point5 As New PointF(300.0F, 100.0F)
    Dim point6 As New PointF(350.0F, 200.0F)
    Dim point7 As New PointF(250.0F, 250.0F)
    Dim curvePoints As PointF() = {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.
    Dim offset As Integer = 2
    Dim numSegments As Integer = 4
    Dim tension As Single = 1.0F

    ' Draw curve to screen.
    e.Graphics.DrawCurve(greenPen, curvePoints, offset, numSegments, _
    tension)
End Sub

Açıklamalar

Bu yöntem, dizideki her noktadan geçen bir kardinal eğri çizer.

Eğrinin çizilmesi için nokta dizisi en az üç PointF yapı içermelidir.

parametresinin offset değeri, dizide atlana öğe sayısını belirtir. Atlanan öğelerden sonraki ilk öğe, eğrinin başlangıç noktasını temsil eder.

parametresinin numberOfSegments değeri, başlangıç noktasından sonra eğride çizecek segment sayısını belirtir. parametresinin numberOfSegments değeri en az 1 olmalıdır. Parametrenin offset değeri ve parametresinin numberOfSegments değeri, parametre dizisindeki öğe sayısından points küçük olmalıdır.

tension parametresi, eğrinin şeklini belirler. Parametrenin tension değeri 0,0F ise, bu yöntem noktaları bağlamak için düz çizgi kesimleri çizer. Genellikle parametresi tension 1,0F'den küçük veya buna eşittir. 1,0F üzerindeki değerler olağan dışı sonuçlar üretir.

Şunlara uygulanır

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

Kaynak:
Graphics.cs
Kaynak:
Graphics.cs
Kaynak:
Graphics.cs

Belirtilen gerilimi kullanarak belirli bir yapı dizisi Point boyunca kardinal bir eğri çizer.

public:
 void DrawCurve(System::Drawing::Pen ^ pen, cli::array <System::Drawing::Point> ^ points, int offset, int numberOfSegments, float tension);
public void DrawCurve (System.Drawing.Pen pen, System.Drawing.Point[] points, int offset, int numberOfSegments, float tension);
member this.DrawCurve : System.Drawing.Pen * System.Drawing.Point[] * int * int * single -> unit
Public Sub DrawCurve (pen As Pen, points As Point(), offset As Integer, numberOfSegments As Integer, tension As Single)

Parametreler

pen
Pen

Pen eğrinin rengini, genişliğini ve stilini belirler.

points
Point[]

Eğriyi Point tanımlayan yapı dizisi.

offset
Int32

Parametre dizisindeki ilk öğeden eğrideki points başlangıç noktasına uzaklık.

numberOfSegments
Int32

Başlangıç noktasından sonra eğriye eklenecek segmentlerin sayısı.

tension
Single

Eğrinin gerilimini belirten 0,0F'den büyük veya 0,0F'ye eşit değer.

Özel durumlar

pen, null değeridir.

-veya-

points, null değeridir.

Örnekler

Aşağıdaki kod örneği, Windows Forms ile kullanılmak üzere tasarlanmıştır ve olay işleyicisinin Paint bir parametresi olan gerektirir.PaintEventArgse Kod aşağıdaki eylemleri gerçekleştirir:

  • Kırmızı ve yeşil kalemler oluşturur.

  • Eğri tanımlamak için yedi nokta oluşturur.

  • Tamamlanmamış bir çokgen oluşturmak için yedi nokta arasına altı kırmızı düz çizgi çizer.

  • Başlangıç noktası uzaklığını ve segment sayısını tanımlar.

  • Gerilimi tanımlar.

  • Son beş nokta boyunca açık bir yeşil eğri (üçüncü noktadan başlayarak) çizer.

yöntemi gerilimi 1.0 olarak ayarlar.

private:
   void DrawCurvePointSegmentTension( PaintEventArgs^ e )
   {
      // Create pens.
      Pen^ redPen = gcnew Pen( Color::Red,3.0f );
      Pen^ greenPen = gcnew Pen( Color::Green,3.0f );

      // Create points that define curve.
      Point point1 = Point(50,50);
      Point point2 = Point(100,25);
      Point point3 = Point(200,5);
      Point point4 = Point(250,50);
      Point point5 = Point(300,100);
      Point point6 = Point(350,200);
      Point point7 = Point(250,250);
      array<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 );
   }
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);
}
Private Sub DrawCurvePointSegmentTension(ByVal e As PaintEventArgs)

    ' Create pens.
    Dim redPen As New Pen(Color.Red, 3)
    Dim greenPen As New Pen(Color.Green, 3)

    ' Create points that define curve.
    Dim point1 As New Point(50, 50)
    Dim point2 As New Point(100, 25)
    Dim point3 As New Point(200, 5)
    Dim point4 As New Point(250, 50)
    Dim point5 As New Point(300, 100)
    Dim point6 As New Point(350, 200)
    Dim point7 As New Point(250, 250)
    Dim curvePoints As Point() = {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.
    Dim offset As Integer = 2
    Dim numSegments As Integer = 4
    Dim tension As Single = 1.0F

    ' Draw curve to screen.
    e.Graphics.DrawCurve(greenPen, curvePoints, offset, numSegments, _
    tension)
End Sub

Açıklamalar

Bu yöntem, dizideki her noktadan geçen bir kardinal eğri çizer.

Bir eğrinin çizilmesi için nokta dizisi en az üç Point yapı içermelidir.

parametresinin offset değeri, dizide atlana öğe sayısını belirtir. Atlanan öğelerden sonraki ilk öğe, eğrinin başlangıç noktasını temsil eder.

parametresinin numberOfSegments değeri, başlangıç noktasından sonra eğride çizecek segment sayısını belirtir. parametresinin numberOfSegments değeri en az 1 olmalıdır. Parametrenin offset değeri ve parametresinin numberOfSegments değeri, parametre dizisindeki öğe sayısından points küçük olmalıdır.

tension parametresi, eğrinin şeklini belirler. Parametrenin tension değeri 0,0F ise, bu yöntem noktaları bağlamak için düz çizgi kesimleri çizer. Genellikle parametresi tension 1,0F'den küçük veya buna eşittir. 1,0F üzerindeki değerler olağan dışı sonuçlar üretir.

Şunlara uygulanır

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

Kaynak:
Graphics.cs
public:
 void DrawCurve(System::Drawing::Pen ^ pen, ReadOnlySpan<System::Drawing::PointF> points, int offset, int numberOfSegments);
public void DrawCurve (System.Drawing.Pen pen, ReadOnlySpan<System.Drawing.PointF> points, int offset, int numberOfSegments);
member this.DrawCurve : System.Drawing.Pen * ReadOnlySpan<System.Drawing.PointF> * int * int -> unit
Public Sub DrawCurve (pen As Pen, points As ReadOnlySpan(Of PointF), offset As Integer, numberOfSegments As Integer)

Parametreler

pen
Pen
offset
Int32
numberOfSegments
Int32

Şunlara uygulanır

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

Kaynak:
Graphics.cs
Kaynak:
Graphics.cs
Kaynak:
Graphics.cs

Belirtilen yapı dizisi aracılığıyla bir kardinal eğrisi çizer PointF . Çizim, dizinin başından itibaren uzaklığı başlatır.

public:
 void DrawCurve(System::Drawing::Pen ^ pen, cli::array <System::Drawing::PointF> ^ points, int offset, int numberOfSegments);
public void DrawCurve (System.Drawing.Pen pen, System.Drawing.PointF[] points, int offset, int numberOfSegments);
member this.DrawCurve : System.Drawing.Pen * System.Drawing.PointF[] * int * int -> unit
Public Sub DrawCurve (pen As Pen, points As PointF(), offset As Integer, numberOfSegments As Integer)

Parametreler

pen
Pen

Pen eğrinin rengini, genişliğini ve stilini belirler.

points
PointF[]

Eğriyi PointF tanımlayan yapı dizisi.

offset
Int32

Parametre dizisindeki ilk öğeden eğrideki points başlangıç noktasına uzaklık.

numberOfSegments
Int32

Başlangıç noktasından sonra eğriye eklenecek segmentlerin sayısı.

Özel durumlar

pen, null değeridir.

-veya-

points, null değeridir.

Örnekler

Aşağıdaki kod örneği, Windows Forms ile kullanılmak üzere tasarlanmıştır ve olay işleyicisinin Paint bir parametresi olan gerektirir.PaintEventArgse Kod aşağıdaki eylemleri gerçekleştirir:

  • Kırmızı ve yeşil kalemler oluşturur.

  • Eğri tanımlamak için yedi nokta oluşturur.

  • Tamamlanmamış bir çokgen oluşturmak için yedi nokta arasına altı kırmızı düz çizgi çizer.

  • Başlangıç noktası uzaklığını ve segment sayısını tanımlar.

  • Son beş nokta boyunca açık bir yeşil eğri (üçüncü noktadan başlayarak) çizer.

yöntemi varsayılan olarak 0,5 gerilimi kullanır.

private:
   void DrawCurvePointFSegments( PaintEventArgs^ e )
   {
      // Create pens.
      Pen^ redPen = gcnew Pen( Color::Red,3.0f );
      Pen^ greenPen = gcnew Pen( Color::Green,3.0f );

      // Create points that define curve.
      PointF point1 = PointF(50.0F,50.0F);
      PointF point2 = PointF(100.0F,25.0F);
      PointF point3 = PointF(200.0F,5.0F);
      PointF point4 = PointF(250.0F,50.0F);
      PointF point5 = PointF(300.0F,100.0F);
      PointF point6 = PointF(350.0F,200.0F);
      PointF point7 = PointF(250.0F,250.0F);
      array<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 );
   }
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);
}
Private Sub DrawCurvePointFSegments(ByVal e As PaintEventArgs)

    ' Create pens.
    Dim redPen As New Pen(Color.Red, 3)
    Dim greenPen As New Pen(Color.Green, 3)

    ' Create points that define curve.
    Dim point1 As New PointF(50.0F, 50.0F)
    Dim point2 As New PointF(100.0F, 25.0F)
    Dim point3 As New PointF(200.0F, 5.0F)
    Dim point4 As New PointF(250.0F, 50.0F)
    Dim point5 As New PointF(300.0F, 100.0F)
    Dim point6 As New PointF(350.0F, 200.0F)
    Dim point7 As New PointF(250.0F, 250.0F)
    Dim curvePoints As PointF() = {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.
    Dim offset As Integer = 2
    Dim numSegments As Integer = 4

    ' Draw curve to screen.
    e.Graphics.DrawCurve(greenPen, curvePoints, offset, numSegments)
End Sub

Açıklamalar

Bu yöntem, dizideki her noktadan geçen bir kardinal eğri çizer.

Bir eğrinin çizilmesi için nokta dizisi en az üç PointF yapı içermelidir.

parametresinin offset değeri, dizide atlana öğe sayısını belirtir. Atlanan öğelerden sonraki ilk öğe, eğrinin başlangıç noktasını temsil eder.

parametresinin numberOfSegments değeri, başlangıç noktasından sonra eğride çizecek segment sayısını belirtir. Parametrenin numberOfSegments değeri en az 1 olmalıdır. Parametrenin offset değeri ve parametrenin numberOfSegments değeri, parametre dizisindeki öğe sayısından points küçük olmalıdır.

Bu yöntem varsayılan 0,5 gerilimini kullanır.

Şunlara uygulanır

DrawCurve(Pen, PointF[], Single)

Kaynak:
Graphics.cs
Kaynak:
Graphics.cs
Kaynak:
Graphics.cs

Belirtilen gerilimi kullanarak belirli bir yapı dizisi PointF üzerinden bir kardinal eğrisi çizer.

public:
 void DrawCurve(System::Drawing::Pen ^ pen, cli::array <System::Drawing::PointF> ^ points, float tension);
public void DrawCurve (System.Drawing.Pen pen, System.Drawing.PointF[] points, float tension);
member this.DrawCurve : System.Drawing.Pen * System.Drawing.PointF[] * single -> unit
Public Sub DrawCurve (pen As Pen, points As PointF(), tension As Single)

Parametreler

pen
Pen

Pen eğrinin rengini, genişliğini ve stilini belirler.

points
PointF[]

Eğriyi PointF tanımlayan noktaları temsil eden yapı dizisi.

tension
Single

Eğrinin gerilimini belirten 0,0F'den büyük veya buna eşit değer.

Özel durumlar

pen, null değeridir.

-veya-

points, null değeridir.

Örnekler

Aşağıdaki kod örneği, Windows Forms ile kullanılmak üzere tasarlanmıştır ve olay işleyicisinin bir parametresi olan öğesini gerektirirPaintEventArgse.Paint Kod aşağıdaki eylemleri gerçekleştirir:

  • Kırmızı ve yeşil kalemler oluşturur.

  • Eğriyi tanımlamak için yedi nokta oluşturur.

  • Tamamlanmamış bir çokgen oluşturmak için yedi nokta arasına altı kırmızı düz çizgi çizer.

  • Gerilim ayarı oluşturur.

  • Yedi nokta boyunca açık yeşil kapalı bir eğri çizer.

yöntemi 1.0 gerilimi kullanır.

private:
   void DrawCurvePointFTension( PaintEventArgs^ e )
   {
      // Create pens.
      Pen^ redPen = gcnew Pen( Color::Red,3.0f );
      Pen^ greenPen = gcnew Pen( Color::Green,3.0f );

      // Create points that define curve.
      PointF point1 = PointF(50.0F,50.0F);
      PointF point2 = PointF(100.0F,25.0F);
      PointF point3 = PointF(200.0F,5.0F);
      PointF point4 = PointF(250.0F,50.0F);
      PointF point5 = PointF(300.0F,100.0F);
      PointF point6 = PointF(350.0F,200.0F);
      PointF point7 = PointF(250.0F,250.0F);
      array<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 );
   }
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);
}
Private Sub DrawCurvePointFTension(ByVal e As PaintEventArgs)

    ' Create pens.
    Dim redPen As New Pen(Color.Red, 3)
    Dim greenPen As New Pen(Color.Green, 3)

    ' Create points that define curve.
    Dim point1 As New PointF(50.0F, 50.0F)
    Dim point2 As New PointF(100.0F, 25.0F)
    Dim point3 As New PointF(200.0F, 5.0F)
    Dim point4 As New PointF(250.0F, 50.0F)
    Dim point5 As New PointF(300.0F, 100.0F)
    Dim point6 As New PointF(350.0F, 200.0F)
    Dim point7 As New PointF(250.0F, 250.0F)
    Dim curvePoints As PointF() = {point1, point2, point3, point4, _
    point5, point6, point7}

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

    ' Create tension.
    Dim tension As Single = 1.0F

    ' Draw curve to screen.
    e.Graphics.DrawCurve(greenPen, curvePoints, tension)
End Sub

Açıklamalar

Bu yöntem, dizideki her noktadan geçen bir kardinal spline çizer.

Bir eğrinin çizilmesi için nokta dizisi en az üç PointF yapı içermelidir.

tension parametresi, eğrinin şeklini belirler. Parametrenin tension değeri 0,0F ise, bu yöntem noktaları bağlamak için düz çizgi kesimleri çizer. Genellikle parametresi tension 1,0F'den küçük veya buna eşittir. 1,0F üzerindeki değerler olağan dışı sonuçlar üretir.

Şunlara uygulanır

DrawCurve(Pen, Point[], Single)

Kaynak:
Graphics.cs
Kaynak:
Graphics.cs
Kaynak:
Graphics.cs

Belirtilen gerilimi kullanarak belirli bir yapı dizisi Point üzerinden bir kardinal eğrisi çizer.

public:
 void DrawCurve(System::Drawing::Pen ^ pen, cli::array <System::Drawing::Point> ^ points, float tension);
public void DrawCurve (System.Drawing.Pen pen, System.Drawing.Point[] points, float tension);
member this.DrawCurve : System.Drawing.Pen * System.Drawing.Point[] * single -> unit
Public Sub DrawCurve (pen As Pen, points As Point(), tension As Single)

Parametreler

pen
Pen

Pen eğrinin rengini, genişliğini ve stilini belirler.

points
Point[]

Eğriyi Point tanımlayan yapı dizisi.

tension
Single

Eğrinin gerilimini belirten 0,0F'den büyük veya buna eşit değer.

Özel durumlar

pen, null değeridir.

-veya-

points, null değeridir.

Örnekler

Aşağıdaki kod örneği, Windows Forms ile kullanılmak üzere tasarlanmıştır ve olay işleyicisinin bir parametresi olan öğesini gerektirirPaintEventArgse.Paint Kod aşağıdaki eylemleri gerçekleştirir:

  • Kırmızı ve yeşil kalemler oluşturur.

  • Eğriyi tanımlamak için yedi nokta oluşturur.

  • Tamamlanmamış bir çokgen oluşturmak için yedi nokta arasına altı kırmızı düz çizgi çizer.

  • Gerilim ayarı oluşturur.

  • Yedi nokta boyunca açık yeşil kapalı bir eğri çizer.

yöntemi 1.0 gerilimi kullanır.

private:
   void DrawCurvePointTension( PaintEventArgs^ e )
   {

      // Create pens.
      Pen^ redPen = gcnew Pen( Color::Red,3.0f );
      Pen^ greenPen = gcnew Pen( Color::Green,3.0f );

      // Create points that define curve.
      Point point1 = Point(50,50);
      Point point2 = Point(100,25);
      Point point3 = Point(200,5);
      Point point4 = Point(250,50);
      Point point5 = Point(300,100);
      Point point6 = Point(350,200);
      Point point7 = Point(250,250);
      array<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 );
   }
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);
}
Private Sub DrawCurvePointTension(ByVal e As PaintEventArgs)

    ' Create pens.
    Dim redPen As New Pen(Color.Red, 3)
    Dim greenPen As New Pen(Color.Green, 3)

    ' Create points that define curve.
    Dim point1 As New Point(50, 50)
    Dim point2 As New Point(100, 25)
    Dim point3 As New Point(200, 5)
    Dim point4 As New Point(250, 50)
    Dim point5 As New Point(300, 100)
    Dim point6 As New Point(350, 200)
    Dim point7 As New Point(250, 250)
    Dim curvePoints As Point() = {point1, point2, point3, point4, _
    point5, point6, point7}

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

    ' Create tension.
    Dim tension As Single = 1.0F

    ' Draw curve to screen.
    e.Graphics.DrawCurve(greenPen, curvePoints, tension)
End Sub

Açıklamalar

Bu yöntem, dizideki her noktadan geçen bir kardinal spline çizer.

Bir eğrinin çizilmesi için nokta dizisi en az üç Point yapı içermelidir.

tension parametresi, eğrinin şeklini belirler. Parametrenin tension değeri 0,0F ise, bu yöntem noktaları bağlamak için düz çizgi kesimleri çizer. Genellikle parametresi tension 1,0F'den küçük veya buna eşittir. 1,0F üzerindeki değerler olağan dışı sonuçlar üretir.

Şunlara uygulanır

DrawCurve(Pen, ReadOnlySpan<PointF>)

Kaynak:
Graphics.cs
public:
 void DrawCurve(System::Drawing::Pen ^ pen, ReadOnlySpan<System::Drawing::PointF> points);
public void DrawCurve (System.Drawing.Pen pen, ReadOnlySpan<System.Drawing.PointF> points);
member this.DrawCurve : System.Drawing.Pen * ReadOnlySpan<System.Drawing.PointF> -> unit
Public Sub DrawCurve (pen As Pen, points As ReadOnlySpan(Of PointF))

Parametreler

pen
Pen

Şunlara uygulanır

DrawCurve(Pen, ReadOnlySpan<Point>)

Kaynak:
Graphics.cs
public:
 void DrawCurve(System::Drawing::Pen ^ pen, ReadOnlySpan<System::Drawing::Point> points);
public void DrawCurve (System.Drawing.Pen pen, ReadOnlySpan<System.Drawing.Point> points);
member this.DrawCurve : System.Drawing.Pen * ReadOnlySpan<System.Drawing.Point> -> unit
Public Sub DrawCurve (pen As Pen, points As ReadOnlySpan(Of Point))

Parametreler

pen
Pen

Şunlara uygulanır

DrawCurve(Pen, PointF[])

Kaynak:
Graphics.cs
Kaynak:
Graphics.cs
Kaynak:
Graphics.cs

Belirtilen yapı dizisi aracılığıyla bir kardinal eğrisi çizer PointF .

public:
 void DrawCurve(System::Drawing::Pen ^ pen, cli::array <System::Drawing::PointF> ^ points);
public:
 void DrawCurve(System::Drawing::Pen ^ pen, ... cli::array <System::Drawing::PointF> ^ points);
public void DrawCurve (System.Drawing.Pen pen, System.Drawing.PointF[] points);
public void DrawCurve (System.Drawing.Pen pen, params System.Drawing.PointF[] points);
member this.DrawCurve : System.Drawing.Pen * System.Drawing.PointF[] -> unit
Public Sub DrawCurve (pen As Pen, points As PointF())
Public Sub DrawCurve (pen As Pen, ParamArray points As PointF())

Parametreler

pen
Pen

Pen eğrinin rengini, genişliğini ve stilini belirler.

points
PointF[]

Eğriyi PointF tanımlayan yapı dizisi.

Özel durumlar

pen, null değeridir.

-veya-

points, null değeridir.

Örnekler

Aşağıdaki kod örneği, Windows Forms ile kullanılmak üzere tasarlanmıştır ve olay işleyicisinin bir parametresi olan öğesini gerektirirPaintEventArgse.Paint Kod aşağıdaki eylemleri gerçekleştirir:

  • Kırmızı ve yeşil kalemler oluşturur.

  • Eğri tanımlamak için yedi nokta oluşturur.

  • Tamamlanmamış bir çokgen oluşturmak için yedi nokta arasına altı kırmızı düz çizgi çizer.

  • Yedi nokta boyunca açık yeşil bir eğri çizer.

yöntemi varsayılan 0,5 gerilimini kullanır.

private:
   void DrawCurvePointF( PaintEventArgs^ e )
   {
      // Create pens.
      Pen^ redPen = gcnew Pen( Color::Red,3.0f );
      Pen^ greenPen = gcnew Pen( Color::Green,3.0f );

      // Create points that define curve.
      PointF point1 = PointF(50.0F,50.0F);
      PointF point2 = PointF(100.0F,25.0F);
      PointF point3 = PointF(200.0F,5.0F);
      PointF point4 = PointF(250.0F,50.0F);
      PointF point5 = PointF(300.0F,100.0F);
      PointF point6 = PointF(350.0F,200.0F);
      PointF point7 = PointF(250.0F,250.0F);
      array<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 );
   }
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);
}
Private Sub DrawCurvePointF(ByVal e As PaintEventArgs)

    ' Create pens.
    Dim redPen As New Pen(Color.Red, 3)
    Dim greenPen As New Pen(Color.Green, 3)

    ' Create points that define curve.
    Dim point1 As New PointF(50.0F, 50.0F)
    Dim point2 As New PointF(100.0F, 25.0F)
    Dim point3 As New PointF(200.0F, 5.0F)
    Dim point4 As New PointF(250.0F, 50.0F)
    Dim point5 As New PointF(300.0F, 100.0F)
    Dim point6 As New PointF(350.0F, 200.0F)
    Dim point7 As New PointF(250.0F, 250.0F)
    Dim curvePoints As PointF() = {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)
End Sub

Açıklamalar

Bu yöntem, dizideki her noktadan geçen bir kardinal spline çizer.

Bir eğrinin çizilmesi için nokta dizisi en az üç PointF yapı içermelidir.

Bu yöntem varsayılan 0,5 gerilimini kullanır.

Şunlara uygulanır

DrawCurve(Pen, Point[])

Kaynak:
Graphics.cs
Kaynak:
Graphics.cs
Kaynak:
Graphics.cs

Belirtilen yapı dizisi aracılığıyla bir kardinal eğrisi çizer Point .

public:
 void DrawCurve(System::Drawing::Pen ^ pen, cli::array <System::Drawing::Point> ^ points);
public:
 void DrawCurve(System::Drawing::Pen ^ pen, ... cli::array <System::Drawing::Point> ^ points);
public void DrawCurve (System.Drawing.Pen pen, System.Drawing.Point[] points);
public void DrawCurve (System.Drawing.Pen pen, params System.Drawing.Point[] points);
member this.DrawCurve : System.Drawing.Pen * System.Drawing.Point[] -> unit
Public Sub DrawCurve (pen As Pen, points As Point())
Public Sub DrawCurve (pen As Pen, ParamArray points As Point())

Parametreler

pen
Pen

Pen eğrinin rengini, genişliğini ve yüksekliğini belirler.

points
Point[]

Eğriyi Point tanımlayan yapı dizisi.

Özel durumlar

pen, null değeridir.

-veya-

points, null değeridir.

Örnekler

Aşağıdaki kod örneği, Windows Forms ile kullanılmak üzere tasarlanmıştır ve olay işleyicisinin bir parametresi olan öğesini gerektirirPaintEventArgse.Paint Kod aşağıdaki eylemleri gerçekleştirir:

  • Kırmızı ve yeşil kalemler oluşturur.

  • Eğri tanımlamak için yedi nokta oluşturur.

  • Tamamlanmamış bir çokgen oluşturmak için yedi nokta arasına altı kırmızı düz çizgi çizer.

  • Yedi nokta boyunca açık yeşil bir eğri çizer.

yöntemi varsayılan 0,5 gerilimini kullanır.

private:
   void DrawCurvePoint( PaintEventArgs^ e )
   {
      // Create pens.
      Pen^ redPen = gcnew Pen( Color::Red,3.0f );
      Pen^ greenPen = gcnew Pen( Color::Green,3.0f );

      // Create points that define curve.
      Point point1 = Point(50,50);
      Point point2 = Point(100,25);
      Point point3 = Point(200,5);
      Point point4 = Point(250,50);
      Point point5 = Point(300,100);
      Point point6 = Point(350,200);
      Point point7 = Point(250,250);
      array<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 );
   }
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);
}
Private Sub DrawCurvePoint(ByVal e As PaintEventArgs)

    ' Create pens.
    Dim redPen As New Pen(Color.Red, 3)
    Dim greenPen As New Pen(Color.Green, 3)

    ' Create points that define curve.
    Dim point1 As New Point(50, 50)
    Dim point2 As New Point(100, 25)
    Dim point3 As New Point(200, 5)
    Dim point4 As New Point(250, 50)
    Dim point5 As New Point(300, 100)
    Dim point6 As New Point(350, 200)
    Dim point7 As New Point(250, 250)
    Dim curvePoints As Point() = {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)
End Sub

Açıklamalar

Bu yöntem, dizideki her noktadan geçen bir kardinal spline çizer.

Bir eğrinin çizilmesi için nokta dizisi en az üç Point yapı içermelidir.

Bu yöntem varsayılan 0,5 gerilimini kullanır.

Şunlara uygulanır

DrawCurve(Pen, ReadOnlySpan<Point>, Single)

Kaynak:
Graphics.cs
public:
 void DrawCurve(System::Drawing::Pen ^ pen, ReadOnlySpan<System::Drawing::Point> points, float tension);
public void DrawCurve (System.Drawing.Pen pen, ReadOnlySpan<System.Drawing.Point> points, float tension);
member this.DrawCurve : System.Drawing.Pen * ReadOnlySpan<System.Drawing.Point> * single -> unit
Public Sub DrawCurve (pen As Pen, points As ReadOnlySpan(Of Point), tension As Single)

Parametreler

pen
Pen
tension
Single

Şunlara uygulanır