Chapter 30. Drawing Basics

Visual Basic .NET provides a large assortment of objects for drawing and for controlling drawing attributes. The Graphics object provides methods that enable you to draw and fill rectangles, ellipses, polygons, curves, lines, and other shapes. Pen and Brush objects determine the appearance of lines (solid, dashed, dotted) and filled areas (solid colors, hatched, filled with a color gradient).

This chapter provides an overview of the drawing process and a survey of the most important drawing namespaces and their classes. It describes in detail the most central of these classes, the Graphics object, and provides examples showing how to use it. You can download example programs demonstrating most of the methods described in this chapter on the book's web site. The examples also include code to draw the figures in this chapter.

Chapter 31, "Brushes, Pens, and Paths," describes some of the other important drawing classes in greater detail.

If you are new to graphics, this chapter and those that follow may involve a lot of new concepts and unfamiliar terms. The examples available on the book's web site will help make many of the concepts more concrete. If you find some terms confusing, you can find additional details by using the advanced Microsoft search page search.microsoft.com/search/search.aspx?st=a. The advanced Google search page www.google.com/advanced_search also returns excellent results and you can enter one of the Microsoft sites www.microsoft.com

Get Visual Basic® 2008 Programmer's Reference 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.