Chapter 7. Pixels

Once you have a device context, the hardest thing to understand in Win32 GDI is drawing a single pixel. We don't mean simply to be able to draw a single pixel, but rather to completely understand all the factors that could affect the drawing of a single pixel. After that, lines, curves, filled areas, bitmaps, and text will follow without much trouble.

Chapter 6 covered coordinate systems, mapping modes, and transformations; this chapter will cover GDI objects, handles, clipping, color, and finally pixel drawing.

GDI OBJECTS, HANDLES, AND HANDLE TABLE

The Win32 API uses dozens of different kinds of objects—file objects, synchronization objects, GDI objects—although the API is not based on any modern object-oriented language. In fact, ...

Get Windows Graphics Programming Win32 GDI and DirectDraw® 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.