ULONG DrvDitherColor(
IN DHPDEV dhpdev, | |
IN ULONG iMode, | |
IN ULONG rgb, | |
OUT ULONG *pul | |
); |
DrvDitherColor requests the device to create a brush dithered against a device palette.
The return value is DCR_DRIVER if the dither values have been calculated by the driver, DCR_SOLID if the engine should use the best solid color approximation of the color, or DCR_HALFTONE if the engine should create a halftone approximation for the driver.
The result of the dither is a set of device color indices stored in pul. A brush created using these colors for its pattern should be a good approximation of the given color rgb.
DrvDitherColor is an optional function that is called only if cxDither and cyDither are nonzero. Monochrome device drivers, including most raster printers, should use the iMode parameter to tell GDI how to get good gray-scale patterns.