Changeset 5799 for trunk/src/gdi32/palette.cpp
- Timestamp:
- May 25, 2001, 12:05:29 PM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gdi32/palette.cpp
r4127 r5799 1 /* $Id: palette.cpp,v 1. 7 2000-08-30 18:05:25sandervl Exp $ */1 /* $Id: palette.cpp,v 1.8 2001-05-25 10:05:29 sandervl Exp $ */ 2 2 3 3 /* … … 81 81 HPALETTE WIN32API SelectPalette(HDC hdc, HPALETTE hPalette, BOOL bForceBackground) 82 82 { 83 HPALETTE hPal; 84 83 85 dprintf(("GDI32: SelectPalette (0x%08X, 0x%08X, 0x%08X)", hdc, hPalette, bForceBackground)); 86 hPal = O32_SelectPalette(hdc, hPalette, bForceBackground); 84 87 if(DIBSection::getSection() != NULL) 85 88 { … … 87 90 if(dsect) 88 91 { 89 int nrcolors; 90 PALETTEENTRY Pal[256]; 91 char PalSize = dsect->GetBitCount(); 92 dprintf((" - Set Palette Values in DIBSection\n")); 93 if(PalSize<=8) 94 { 95 nrcolors = GetPaletteEntries( hPalette, 0, 1<<PalSize, (LPPALETTEENTRY)&Pal); 96 dsect->SetDIBColorTable(0, nrcolors, (RGBQUAD*)&Pal); 97 } 98 92 dsect->sync(hdc, 0, dsect->GetHeight()); 99 93 } 100 94 } 101 return O32_SelectPalette(hdc, hPalette, bForceBackground);95 return hPal; 102 96 } 103 97 //******************************************************************************
Note:
See TracChangeset
for help on using the changeset viewer.