Supporting Graphics Output

The particular graphics output operations that a driver handles depend upon the drawing surface and the capabilities of the hardware. If the surface is a standard-format DIB, GDI will handle all rendering operations by default. The driver can hook out any of the drawing functions and implement them to take advantage of hardware support.

For a device-managed surface, a driver must, at a minimum, support the graphics output functions DrvCopyBits, DrvTextOut, and DrvStrokePath. It can support any of the other graphics output functions; supporting DrvBitBlt and DrvPaint, for example, can enhance performance. Some functions require a certain level of capability while others allow the device to indicate its capability by setting the appropriate GCAPS flags in the DEVINFO structure.

The topics that follow describe how a driver can implement the following operations:

·Drawing lines and curves

·Drawing and filling paths

·Painting regions

·Copying bitmaps

·Halftoning