5. Drawing Basics
AS HANDY AS FORMS are and as rich as the set of built-in controls is, sometimes neither is sufficient to render the state of your application.[1] In that case, you need to draw the state yourself. You may be drawing to the screen, to a file, or to a printer, but wherever you're drawing to, you're dealing with the same primitives—colors, brushes, pens, and fonts—and the same kinds of things to draw: shapes, images, and strings. This chapter starts by examining the fundamentals of drawing to the screen and the basic building blocks of drawing.
Note that all the drawing techniques discussed in this chapter and in the next two chapters relate equally well to controls as to forms. For information about building custom controls, ...
Get Windows Forms 2.0 Programming 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.