This chapter introduces the idea of the device context, generalizing the concept of a drawing surface such as a window or a printed page. We will discuss the available device context classes and the set of “Drawing Tools” that wxWidgets provides for handling fonts, color, line drawing, and filling. Next we describe a device context’s drawing functions and how to use the wxWidgets printing framework. We end the chapter by briefly discussing
wxGLCanvas, which provides a way for you to draw 3D graphics on your windows using OpenGL.
All drawing in wxWidgets is done on a device context, using an instance of a class derived from
wxDC. There is no such thing as drawing directly to ...