Summary

In this chapter we learned how to work with pens and brushes by using classes from the GDI+ .NET Framework class library. The chapter began by showing how to represent various kinds of brushes in GDI+. We learned the classes for the different brushes and how to use their properties and methods.

After covering brushes, the discussion moved on to pens and how to represent them using GDI+ classes. We learned pen-related classes and their properties and methods, and how to add various styles to pens, such as cap, line, and dash styles. We also discussed system pens and brushes, and how to use GDI+ classes to represent and use system pens and brushes.

At the end of the chapter we added options for pens and brushes to the GDI+Painter application. ...

Get Graphics Programming with GDI+ 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.