mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 16:43:04 +00:00
[GDI32_APITEST]
Add tests for OffsetRgn, PaintRgn and FrameRgn, fix 1BPP DIB creation in InitStuff() svn path=/trunk/; revision=66259
This commit is contained in:
parent
46e350e52c
commit
dd25b0e4c0
7 changed files with 285 additions and 4 deletions
|
@ -9,7 +9,6 @@ HBITMAP ghbmpDIB1, ghbmpDIB4, ghbmpDIB8, ghbmpDIB16, ghbmpDIB24, ghbmpDIB32;
|
|||
HDC ghdcDIB1, ghdcDIB4, ghdcDIB8, ghdcDIB16, ghdcDIB24, ghdcDIB32;
|
||||
PVOID gpvDIB1, gpvDIB4, gpvDIB8, gpvDIB16, gpvDIB24, gpvDIB32;
|
||||
ULONG (*gpDIB32)[8][8];
|
||||
PULONG pulDIB4Bits;
|
||||
HPALETTE ghpal;
|
||||
|
||||
MYPAL gpal =
|
||||
|
@ -40,7 +39,7 @@ InitPerBitDepth(
|
|||
struct
|
||||
{
|
||||
BITMAPINFOHEADER bmiHeader;
|
||||
RGBQUAD bmiColors[256];
|
||||
ULONG bmiColors[256];
|
||||
} bmiBuffer;
|
||||
LPBITMAPINFO pbmi = (LPBITMAPINFO)&bmiBuffer;
|
||||
|
||||
|
@ -66,6 +65,13 @@ InitPerBitDepth(
|
|||
pbmi->bmiHeader.biClrUsed = 0;
|
||||
pbmi->bmiHeader.biClrImportant = 0;
|
||||
|
||||
if (cBitsPerPixel == 1)
|
||||
{
|
||||
bmiBuffer.bmiColors[0] = 0;
|
||||
bmiBuffer.bmiColors[1] = 0xFFFFFF;
|
||||
pbmi->bmiHeader.biClrUsed = 2;
|
||||
}
|
||||
|
||||
/* Create a compatible DC for the DIB */
|
||||
*phdcDIB = CreateCompatibleDC(0);
|
||||
if (*phdcDIB == NULL)
|
||||
|
@ -110,7 +116,6 @@ BOOL InitStuff(void)
|
|||
}
|
||||
|
||||
gpDIB32 = gpvDIB32;
|
||||
pulDIB4Bits = gpvDIB4;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue