INFO: Creating DIB Brushes With DIB_PAL_COLORS (186585)
The information in this article applies to:
- Microsoft Windows 2000 Server
- Microsoft Windows 2000 Advanced Server
- Microsoft Windows 2000 Professional
- Microsoft Win32 Application Programming Interface (API)
This article was previously published under Q186585 SUMMARY
When you use CreateBrushIndirect(), CreateDIBPatternBrush(), or
CreateDIBPatternBrushPt() to create a device-independent bitmap (DIB)
pattern brush with DIB_PAL_COLORS specified for the color usage, the
Graphics Device Interface (GDI) uses the color indices in the bmiColors
field in the BITMAPINFO structure to populate the color table of the DIB.
GDI resolves the indices to the RGB values from the palette selected into
the device context where the brush is selected.
This mapping is performed only once when the brush is selected. Subsequent
use of the brush yields results based on the initial mapping because the
DIBs color table contains the resolved RGB values rather than the original
palette indices.
Modification Type: | Minor | Last Reviewed: | 3/7/2005 |
---|
Keywords: | kbinfo KB186585 |
---|
|