Shapes

Now that you know how to frame and fill shapes with pens and brushes, you might be interested in the shapes that are available. Figure 4.15 shows them.

Figure 4.15. The Basic Shapes

All the shapes in Figure 4.15 were edged using a DrawXxx function from the Graphics object for the form—for example, DrawArc and DrawBezier. The shapes that can be filled were drawn using a FillXxx function, such as FillClosedCurve and FillEllipse. Not all of the shapes could be filled because not all of them are closed shapes; for example, there is no FillCurve. However, all the open shapes (except the Bezier) have closed-shape equivalents; for example, a filled ...

Get Windows Forms Programming in C# 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.