43 {
RGB(0,0,255), -1,
"blue"}
54 if(stock[
i].stockobj != -1) {
56 ok(stockBrush!=solidBrush ||
57 broken(stockBrush==solidBrush),
58 "Stock %s brush equals solid %s brush\n", stock[
i].
name, stock[
i].
name);
62 memset(&br, 0,
sizeof(br));
79 "GetObject succeeded on a deleted %s brush\n", stock[
i].
name);
89 for (
i = 0;
i < 20;
i++)
95 ok( brush != 0,
"%u: CreateHatchBrush failed err %lu\n",
i,
GetLastError() );
97 ok(
size ==
sizeof(lb),
"wrong size %u\n",
size );
113 ok( !brush,
"%u: CreateHatchBrush succeeded\n",
i );
124 HBRUSH brush, brush2;
139 ok( brush !=
NULL,
"CreatePatternBrush failed\n" );
140 memset( &br, 0x55,
sizeof(br) );
142 ok(
ret ==
sizeof(br),
"wrong size %u\n",
ret );
152 ok( brush !=
NULL,
"CreatePatternBrush failed\n" );
153 memset( &br, 0x55,
sizeof(br) );
155 ok(
ret ==
sizeof(br),
"wrong size %u\n",
ret );
163 ok(
ret == 0,
"wrong size %u\n",
ret );
167 info->bmiHeader.biSize =
sizeof(
info->bmiHeader);
168 info->bmiHeader.biHeight = 32;
169 info->bmiHeader.biWidth = 32;
170 info->bmiHeader.biBitCount = 1;
171 info->bmiHeader.biPlanes = 1;
178 ok( brush !=
NULL,
"CreatePatternBrush failed\n" );
179 memset( &br, 0x55,
sizeof(br) );
181 ok(
ret ==
sizeof(br),
"wrong size %u\n",
ret );
186 ok(
ret ==
sizeof(dib),
"wrong size %u\n",
ret );
191 ok( brush !=
NULL,
"CreatePatternBrush failed\n" );
192 memset( &br, 0x55,
sizeof(br) );
194 ok(
ret ==
sizeof(br),
"wrong size %u\n",
ret );
205 ok( brush !=
NULL,
"CreatePatternBrush failed\n" );
206 memset( &br, 0x55,
sizeof(br) );
208 ok(
ret ==
sizeof(br),
"wrong size %u\n",
ret );
221 ok( brush !=
NULL,
"CreatePatternBrush failed\n" );
222 memset( &br, 0x55,
sizeof(br) );
224 ok(
ret ==
sizeof(br),
"wrong size %u\n",
ret );
232 ok(
ret == 2,
"wrong flags %x\n",
ret );
235 ok(
ret == 2,
"wrong flags %x\n",
ret );
238 ok( brush != 0,
"CreateDIBPatternBrushPt failed\n" );
241 ok( brush != 0,
"CreateDIBPatternBrushPt failed\n" );
244 ok( !brush,
"CreateDIBPatternBrushPt succeeded\n" );
246 ok( !brush,
"CreateDIBPatternBrushPt succeeded\n" );
248 info->bmiHeader.biBitCount = 8;
251 ok( !brush,
"CreateDIBPatternBrushPt succeeded\n" );
253 info->bmiHeader.biBitCount = 4;
256 ok( !brush,
"CreateDIBPatternBrushPt succeeded\n" );
262 ok( !brush,
"CreatePatternBrush succeeded\n" );
268 ok( !brush,
"CreatePatternBrush succeeded\n" );
274 ok( !brush,
"CreatePatternBrush succeeded\n" );
293 ok(
color == 0xff5511,
"Expected color %#x, got %#lx.\n", 0xff5511,
color );
303 memset( &br, 0,
sizeof(br) );
305 ok(
ret ==
sizeof(br),
"wrong size %u\n",
ret );
311 memset( &bm, 0,
sizeof (bm));
320 ok(
color == 0xabcdef,
"Expected color %#x, got %#lx.\n", 0xabcdef,
color );
328 ok(
color == 0xff5511,
"Expected color %#x, got %#lx.\n", 0xff5511,
color );
352 info->bmiHeader.biSize =
sizeof(
info->bmiHeader);
353 info->bmiHeader.biWidth = 16;
354 info->bmiHeader.biHeight = 16;
355 info->bmiHeader.biPlanes = 1;
356 info->bmiHeader.biBitCount = 32;
359 ok( dib !=
NULL,
"CreateDIBSection failed\n" );
361 info->bmiHeader.biBitCount = 8;
365 ok( brush !=
NULL,
"CreateDIBPatternBrushPt failed\n" );
369 for (
i = 0;
i < 256;
i++)
371 pal->palPalEntry[
i].peRed =
i * 2;
372 pal->palPalEntry[
i].peGreen =
i * 2;
373 pal->palPalEntry[
i].peBlue =
i * 2;
374 pal->palPalEntry[
i].peFlags = 0;
381 memset( dib_bits, 0xaa, 16 * 16 * 4 );
383 for (
i = 0;
i < 256;
i++)
386 pal->palPalEntry[255 -
i].peGreen << 8 |
387 pal->palPalEntry[255 -
i].peBlue);
388 ok( dib_bits[
i] ==
expect,
"wrong bits %lx/%lx at %u,%u\n", dib_bits[
i],
expect,
i % 16,
i / 16 );
391 for (
i = 0;
i < 256;
i++) pal->palPalEntry[
i].peRed =
i * 3;
394 memset( dib_bits, 0xaa, 16 * 16 * 4 );
396 for (
i = 0;
i < 256;
i++)
399 pal->palPalEntry[255 -
i].peGreen << 8 |
400 pal->palPalEntry[255 -
i].peBlue);
401 ok( dib_bits[
i] ==
expect,
"wrong bits %lx/%lx at %u,%u\n", dib_bits[
i],
expect,
i % 16,
i / 16 );
417 ok(
ret,
"Unexpected return value %d.\n",
ret);
420 ok(
ret,
"Unexpected return value %d.\n",
ret);
421 ok(
pt.x == 0 &&
pt.y == 0,
"got %ld,%ld\n",
pt.x,
pt.y );
423 ok(
ret,
"Unexpected return value %d.\n",
ret);
424 ok(
pt.x == 1 &&
pt.y == 1,
"got %ld,%ld\n",
pt.x,
pt.y );
426 ok(
ret,
"Unexpected return value %d.\n",
ret);
427 ok(
pt.x == 0x10000 &&
pt.y == -1,
"got %ld,%ld\n",
pt.x,
pt.y );
430 ok(
ret,
"Unexpected return value %d.\n",
ret);
431 ok(
pt.x == 0 &&
pt.y == 0,
"got %ld,%ld\n",
pt.x,
pt.y );
436 ok(!
ret,
"Unexpected return value %d.\n",
ret);
438 ok(
pt.x == 10 &&
pt.y == 20,
"got %ld,%ld\n",
pt.x,
pt.y );
440 ok(
ret,
"Unexpected return value %d.\n",
ret);
442 ok(
pt.x == 0 &&
pt.y == 0,
"got %ld,%ld\n",
pt.x,
pt.y );
DWORD GetPixel(LPDIRECTDRAWSURFACE7 Surface, UINT x, UINT y)
GLuint GLuint GLsizei GLenum const GLvoid * indices
GLenum GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * bits
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
HGLOBAL NTAPI GlobalFree(HGLOBAL hMem)
UINT NTAPI GlobalFlags(HGLOBAL hMem)
HGLOBAL NTAPI GlobalAlloc(UINT uFlags, SIZE_T dwBytes)
static ERESOURCE GlobalLock
#define memcpy(s1, s2, n)
struct _STOCK_BRUSH STOCK_BRUSH
static void test_pattern_brush(void)
static void test_hatch_brush(void)
static void test_solidbrush(void)
static void test_brush_org(void)
static void test_palette_brush(void)
static void test_null_brush(void)
HBITMAP WINAPI CreateDIBSection(HDC hDC, CONST BITMAPINFO *BitmapInfo, UINT Usage, VOID **Bits, HANDLE hSection, DWORD dwOffset)
DWORD WINAPI GetLastError(void)
HBRUSH WINAPI CreateBrushIndirect(_In_ const LOGBRUSH *plb)
HGDIOBJ WINAPI GetStockObject(_In_ int)
int WINAPI GetObjectW(_In_ HANDLE h, _In_ int c, _Out_writes_bytes_opt_(c) LPVOID pv)
HBITMAP WINAPI CreateBitmap(_In_ INT cx, _In_ INT cy, _In_ UINT cPlanes, _In_ UINT cBitsPerPel, _In_opt_ const VOID *pvBits)
BOOL WINAPI GetBrushOrgEx(_In_ HDC, _Out_ LPPOINT)
struct tagPALETTEENTRY PALETTEENTRY
BOOL WINAPI SetBrushOrgEx(_In_ HDC, _In_ int, _In_ int, _Out_opt_ LPPOINT)
HBRUSH WINAPI CreateHatchBrush(_In_ int, _In_ COLORREF)
HPALETTE WINAPI CreatePalette(_In_reads_(_Inexpressible_(2 *sizeof(WORD)+plpal->palNumEntries *sizeof(PALETTEENTRY))) const LOGPALETTE *)
BOOL WINAPI FixBrushOrgEx(_In_ HDC, _In_ int, _In_ int, _In_opt_ LPPOINT)
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)
HBITMAP WINAPI CreateCompatibleBitmap(_In_ HDC hdc, _In_ INT cx, _In_ INT cy)
int WINAPI FillRect(HDC, LPCRECT, HBRUSH)
HBRUSH WINAPI CreateDIBPatternBrushPt(_In_ const VOID *pvPackedDIB, _In_ UINT uUsage)
HBRUSH WINAPI CreateSolidBrush(_In_ COLORREF)
BOOL WINAPI DeleteDC(_In_ HDC)
HBRUSH WINAPI CreatePatternBrush(_In_ HBITMAP)
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
HDC WINAPI GetDC(_In_opt_ HWND)
BOOL WINAPI SetRect(_Out_ LPRECT, _In_ int, _In_ int, _In_ int, _In_ int)