O'Reilly logo

Windows Graphics Programming Win32 GDI and DirectDraw® by Feng Yuan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required