mirror of
https://github.com/reactos/reactos.git
synced 2024-10-05 17:06:29 +00:00
[win32k]
- IntGetDIBColorTable: return the number of actually copied color table entries - DIB_CreateDIBSection: simplify calculation of palette entry count - IntHandleSpecialColorType: remove leftover debug print svn path=/trunk/; revision=44761
This commit is contained in:
parent
185c716bb3
commit
ade1987d18
|
@ -682,10 +682,6 @@ VOID IntHandleSpecialColorType(HDC hDC, COLORREF* Color)
|
|||
{
|
||||
*Color = RGB(palEntry.peRed, palEntry.peGreen, palEntry.peBlue);
|
||||
}
|
||||
else
|
||||
{
|
||||
DPRINT1("no wai!\n");
|
||||
}
|
||||
DC_UnlockDc(pdc);
|
||||
break;
|
||||
case 0x01: /* PALETTEINDEX */
|
||||
|
|
|
@ -149,7 +149,7 @@ IntGetDIBColorTable(
|
|||
PDC dc;
|
||||
PSURFACE psurf;
|
||||
PPALETTE PalGDI;
|
||||
UINT Index;
|
||||
UINT Index, Count = 0;
|
||||
ULONG biBitCount;
|
||||
|
||||
if (!(dc = DC_LockDc(hDC))) return 0;
|
||||
|
@ -197,15 +197,14 @@ IntGetDIBColorTable(
|
|||
Colors[Index - StartIndex].rgbGreen = PalGDI->IndexedColors[Index].peGreen;
|
||||
Colors[Index - StartIndex].rgbBlue = PalGDI->IndexedColors[Index].peBlue;
|
||||
Colors[Index - StartIndex].rgbReserved = 0;
|
||||
Count++;
|
||||
}
|
||||
PALETTE_UnlockPalette(PalGDI);
|
||||
}
|
||||
else
|
||||
Entries = 0;
|
||||
|
||||
DC_UnlockDc(dc);
|
||||
|
||||
return Entries;
|
||||
return Count;
|
||||
}
|
||||
|
||||
// Converts a DIB to a device-dependent bitmap
|
||||
|
@ -1509,17 +1508,14 @@ DIB_CreateDIBSection(
|
|||
table between the DIB and the X physical device. Obviously,
|
||||
this is left out of the ReactOS implementation. Instead,
|
||||
we call NtGdiSetDIBColorTable. */
|
||||
bi->biClrUsed = 0;
|
||||
/* set number of entries in bmi.bmiColors table */
|
||||
if (bi->biBitCount == 1) {
|
||||
bi->biClrUsed = 2;
|
||||
} else
|
||||
if (bi->biBitCount == 4) {
|
||||
bi->biClrUsed = 16;
|
||||
} else
|
||||
if (bi->biBitCount == 8) {
|
||||
bi->biClrUsed = 256;
|
||||
}
|
||||
if (bi->biBitCount <= 8)
|
||||
{
|
||||
bi->biClrUsed = 1 << bi->biBitCount;
|
||||
}
|
||||
else
|
||||
{
|
||||
bi->biClrUsed = 0;
|
||||
}
|
||||
|
||||
bmp->hDIBSection = section;
|
||||
bmp->hSecure = hSecure;
|
||||
|
|
Loading…
Reference in a new issue