Abstract

Graphics programming is a complex task. The graphics programmer needs to be able to create a number of shapes, colors, and patterns on the monitor. Different monitors have different characteristics. Graphics programs have to be able to detect the monitor type and make adjustments for different characteristics. Fortunately, Microsoft has done quite a bit to lighten the load. Microsoft C provides a set of routines that are automatically linked into programs when they are needed. This set of routines is called the run-time library. The run-time library contains a set of graphics routines. To use the graphics library, it is necessary to include a header file named “graph.h”, which contains constant definitions and function prototypes needed by the graphics library. This chapter discusses the most commonly used functions and the functions for drawing lines and shapes, especially ellipses and polygons. Patterned lines are dashed lines, dotted lines, or other lines that are not solid. Microsoft provides the _setlinestyle( ) function for setting the pattern of the line to whatever the programmers wants.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call