Skip to content

Latest commit

 

History

History
36 lines (26 loc) · 1.83 KB

how-to-draw-a-sequence-of-bezier-splines.md

File metadata and controls

36 lines (26 loc) · 1.83 KB
title ms.date dev_langs helpviewer_keywords ms.assetid description
How to: Draw a Sequence of Bézier Splines
03/30/2017
csharp
vb
splines [Windows Forms], drawing Bezier
Bezier splines [Windows Forms], drawing sequence of
37a0bedb-20c2-4cf0-91fa-a5509e826b30
Learn how to use the DrawBeziers method of the Graphics class to draw a sequence of connected Bézier splines.

How to: Draw a Sequence of Bézier Splines

You can use the xref:System.Drawing.Graphics.DrawBeziers%2A method of the xref:System.Drawing.Graphics class to draw a sequence of connected Bézier splines.

Example

The following example draws a curve that consists of two connected Bézier splines. The endpoint of the first Bézier spline is the start point of the second Bézier spline.

The following illustration shows the connected splines along with the seven points:

Graphic that shows the connected splines along with seven points.

[!code-csharpSystem.Drawing.ConstructingDrawingCurves#11] [!code-vbSystem.Drawing.ConstructingDrawingCurves#11]

Compiling the Code

The preceding example is designed for use with Windows Forms, and it requires xref:System.Windows.Forms.PaintEventArgs e, which is a parameter of the xref:System.Windows.Forms.Control.Paint event handler.

See also