O'Reilly logo

Application Development Using Visual Basic® and .NET by Dana L. Wyatt, Peter Thorsteinson, Robert J. Oberg

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Pens and Brushes

As we mentioned earlier in our survey of GDI+ architecture, when you draw, you need to make use of drawing tools, such as pens and brushes, which are defined by their own classes in the .NET Framework. The Pen class defines objects that are used to draw lines and curves. A pen has a width, dash style, and a color (or in fact can have an associated brush). There are several brush classes, which are used for drawing the interior of a shape. In this section we will examine some of the details of working with pens and brushes. We begin with pens, which are simpler.

Pens

Pens are used to draw lines and curves. Compared to brushes, pens are quite simple objects. There is a single class, Pen, in the System.Drawing namespace that is ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required