A gamma ramp is used to map the range of possible intensities for each color to a limited number (256) of values. An IHV chooses these values so that the transition from one color intensity to the next is as smooth as possible, given that the eye perceives changes in light intensity nonlinearly.
DirectDraw® takes a pixel from the frame buffer, and examines it in terms of its individual red, green, and blue color components. Each component is represented by a value from 0 to 65535. DirectDraw takes the original value, and uses it as an index into a 256-element array (the ramp), where each element contains a value that replaces the original one. DirectDraw performs this "look-up and replace" process for each color component of each pixel within the frame buffer, thereby changing the final colors for all of the on-screen pixels. For more information, see the Platform SDK documentation.
A GPD also contains the printer commands and attributes that enable Unidrv to generate the correct printer-ready output data when the user prints from a Windows-based application. Creating a printer driver for Windows 2000 and later can be as simple as creating a GPD file if there is no custom functionality beyond what Unidrv provides.
See DrvGradientFill.
The Win32 GDI library that is directly accessible to Win32 applications can be found in gdi32.dll. It fields calls to the functions listed in wingdi.h and passes the application-supplied information to kernel-mode GDI by way of executive system services in the NT-based operating system. The kernel-mode GDI library is found in win32k.sys. Kernel-mode GDI communicates with a graphics driver by calling the driver's implementations of the DDI functions listed in winddi.h.
See also the kernel-mode GDI definition under GDI.