Chapter 4. Working with Brushes and Pens

Brushes and Pens are the two most frequently used objects in graphics applications. Pens are used to draw the outlines of graphics objects such as lines and curves; brushes are used to fill the graphic objects’ interior areas (e.g., filling a rectangle or an ellipse). In this chapter we will discuss how to create and use various types of brushes and pens.

We begin by discussing brushes, brush types, their methods and properties, and how to create and use them in GDI+.

GDI+ provides the Pen and Pens classes to represent pens. In this chapter we will discuss how to create different kinds of pens using the Pen class and its properties, and how to use the Pen class methods. We will also discuss how to add ...

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.