275{
284 HBRUSH brush;
287
289 info->bmiHeader.biSize =
sizeof(
info->bmiHeader);
290 info->bmiHeader.biWidth = 16;
291 info->bmiHeader.biHeight = 16;
292 info->bmiHeader.biPlanes = 1;
293 info->bmiHeader.biBitCount = 32;
296 ok(
dib !=
NULL,
"CreateDIBSection failed\n" );
297
298 info->bmiHeader.biBitCount = 8;
302 ok( brush !=
NULL,
"CreateDIBPatternBrushPt failed\n" );
303
306 for (
i = 0;
i < 256;
i++)
307 {
308 pal->palPalEntry[
i].peRed =
i * 2;
309 pal->palPalEntry[
i].peGreen =
i * 2;
310 pal->palPalEntry[
i].peBlue =
i * 2;
311 pal->palPalEntry[
i].peFlags = 0;
312 }
314
318 memset( dib_bits, 0xaa, 16 * 16 * 4 );
320 for (
i = 0;
i < 256;
i++)
321 {
323 pal->palPalEntry[255 -
i].peGreen << 8 |
324 pal->palPalEntry[255 -
i].peBlue);
325 ok( dib_bits[
i] ==
expect,
"wrong bits %x/%x at %u,%u\n", dib_bits[
i],
expect,
i % 16,
i / 16 );
326 }
327
328 for (
i = 0;
i < 256;
i++) pal->palPalEntry[
i].peRed =
i * 3;
331 memset( dib_bits, 0xaa, 16 * 16 * 4 );
333 for (
i = 0;
i < 256;
i++)
334 {
336 pal->palPalEntry[255 -
i].peGreen << 8 |
337 pal->palPalEntry[255 -
i].peBlue);
338 ok( dib_bits[
i] ==
expect,
"wrong bits %x/%x at %u,%u\n", dib_bits[
i],
expect,
i % 16,
i / 16 );
339 }
345}
GLuint GLuint GLsizei GLenum const GLvoid * indices
HBITMAP WINAPI CreateDIBSection(HDC hDC, CONST BITMAPINFO *BitmapInfo, UINT Usage, VOID **Bits, HANDLE hSection, DWORD dwOffset)
struct tagPALETTEENTRY PALETTEENTRY
HPALETTE WINAPI CreatePalette(_In_reads_(_Inexpressible_(2 *sizeof(WORD)+plpal->palNumEntries *sizeof(PALETTEENTRY))) const LOGPALETTE *)
HPALETTE WINAPI SelectPalette(_In_ HDC, _In_ HPALETTE, _In_ BOOL)
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
HDC WINAPI CreateCompatibleDC(_In_opt_ HDC hdc)
BOOL WINAPI PatBlt(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _In_ DWORD)
HBRUSH WINAPI CreateDIBPatternBrushPt(_In_ const VOID *pvPackedDIB, _In_ UINT uUsage)
BOOL WINAPI DeleteDC(_In_ HDC)