ABSTRACT

This chapter explores the graphics functions in the Windows Graphics Device Interface, concentrating on geometrical elements that contain an interior region, in addition to a perimeter or outline. These are called solid or closed figures. The interior area allows them to be filled with a given color, hatch pattern, or bitmap image. The perimeter of a closed figure can be rendered differently than the filled area. Closed figures allow several graphics manipulations. A solid figure can be used to define the output area to which Windows can perform drawing operations. This area, called the clipping region, allows to produce unique and interesting graphics effects, such as filling geometrical figures with text or pictures. The Windows header file windowsx.h contains four macros that can be used in selecting a pen, brush, font, or bitmap. If an application requires a brush with a hatch pattern different from the ones pre-defined in Windows, it can create a custom brush with its own bitmap.