Chapter 8. Lines and Curves

Connecting pixels together forms lines and curves. So once you know how to draw single pixels, drawing lines and curves is just a matter of mathematics and computer programming. But the lines and curves used in real life come in different colors, styles, widths, patterns and other decorations; drawing them can be quite involved.

This chapter will cover the GDI concepts and features supporting line and curve drawing; these are binary raster operations, background modes, pens, lines, curves, and paths.

BINARY RASTER OPERATIONS

When you call the SetPixel function to draw a color pixel on a device surface, the color specifier is translated into a color format (physical color) suitable for the device frame buffer, then the ...

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.