O'Reilly logo

Graphics Programming with GDI+ by Mahesh Chand

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

4.6. A Real-World Example: Adding Colors, Pens, and Brushes to the GDI+Painter Application

In Chapter 3 we created the GDI+Painter application, which allows us to draw simple objects, such as a line, a rectangle, and an ellipse. In this section we will extend the functionality of GDI+Painter by adding support for brushes and pens. After completing this section, you will be able to select a pen color and its width, color transparency, and brush color.

Figure 4.32 shows the modified version of GDI+Painter without any objects..

Figure 4.32. GDI+Painter with pen and brush support

Transparency is a component of the color in GDI+. In the .NET Framework ...

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