Curves and Paths

GDI has had Bezier curves and temporary paths for some time. GDI+ expands these capabilities by providing a rich set of functionality for curves and a persistent path object.

The simplest form is the curve drawn from an array of points. The curve is drawn so that it passes through each point on the array. The tension of the curve for any particular point is controlled by the positions of the points on either side of it in the array. The true Bezier curve has two points associated with each node—a position and a control point. Tension of the curve is determined by the relationship of the control point to the direction of the line.

Listing 3.5.4 illustrates the use of the Graphics.DrawCurve method by creating a set of positions ...

Get C# and the .NET Framework: The C++ Perspective now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.