43 {
RGB(0,0,255), -1,
"blue"}
51 for(
i=0;
i<
sizeof(stock)/
sizeof(stock[0]);
i++) {
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 %u\n",
i,
GetLastError() );
97 ok(
size ==
sizeof(lb),
"wrong size %u\n",
size );
113 ok( !brush,
"%u: CreateHatchBrush succeeded\n",
i );
134 ok( brush !=
NULL,
"CreatePatternBrush failed\n" );
135 memset( &br, 0x55,
sizeof(br) );
137 ok(
ret ==
sizeof(br),
"wrong size %u\n",
ret );
147 ok( brush !=
NULL,
"CreatePatternBrush failed\n" );
148 memset( &br, 0x55,
sizeof(br) );
150 ok(
ret ==
sizeof(br),
"wrong size %u\n",
ret );
155 ok(
ret ==
sizeof(
dib.dsBm),
"wrong size %u\n",
ret );
158 ok(
ret == 0,
"wrong size %u\n",
ret );
162 info->bmiHeader.biSize =
sizeof(
info->bmiHeader);
163 info->bmiHeader.biHeight = 32;
164 info->bmiHeader.biWidth = 32;
165 info->bmiHeader.biBitCount = 1;
166 info->bmiHeader.biPlanes = 1;
173 ok( brush !=
NULL,
"CreatePatternBrush failed\n" );
174 memset( &br, 0x55,
sizeof(br) );
176 ok(
ret ==
sizeof(br),
"wrong size %u\n",
ret );
186 ok( brush !=
NULL,
"CreatePatternBrush failed\n" );
187 memset( &br, 0x55,
sizeof(br) );
189 ok(
ret ==
sizeof(br),
"wrong size %u\n",
ret );
200 ok( brush !=
NULL,
"CreatePatternBrush failed\n" );
201 memset( &br, 0x55,
sizeof(br) );
203 ok(
ret ==
sizeof(br),
"wrong size %u\n",
ret );
216 ok( brush !=
NULL,
"CreatePatternBrush failed\n" );
217 memset( &br, 0x55,
sizeof(br) );
219 ok(
ret ==
sizeof(br),
"wrong size %u\n",
ret );
227 ok(
ret == 2,
"wrong flags %x\n",
ret );
230 ok(
ret == 2,
"wrong flags %x\n",
ret );
233 ok( brush != 0,
"CreateDIBPatternBrushPt failed\n" );
236 ok( brush != 0,
"CreateDIBPatternBrushPt failed\n" );
239 ok( !brush,
"CreateDIBPatternBrushPt succeeded\n" );
241 ok( !brush,
"CreateDIBPatternBrushPt succeeded\n" );
243 info->bmiHeader.biBitCount = 8;
246 ok( !brush,
"CreateDIBPatternBrushPt succeeded\n" );
248 info->bmiHeader.biBitCount = 4;
251 ok( !brush,
"CreateDIBPatternBrushPt succeeded\n" );
257 ok( !brush,
"CreatePatternBrush succeeded\n" );
263 ok( !brush,
"CreatePatternBrush succeeded\n" );
269 ok( !brush,
"CreatePatternBrush succeeded\n" );
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" );
298 info->bmiHeader.biBitCount = 8;
302 ok( brush !=
NULL,
"CreateDIBPatternBrushPt failed\n" );
306 for (
i = 0;
i < 256;
i++)
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;
318 memset( dib_bits, 0xaa, 16 * 16 * 4 );
320 for (
i = 0;
i < 256;
i++)
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 );
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++)
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 );
355 ok(
pt.x == 0 &&
pt.y == 0,
"got %d,%d\n",
pt.x,
pt.y );
357 ok(
pt.x == 1 &&
pt.y == 1,
"got %d,%d\n",
pt.x,
pt.y );
359 ok(
pt.x == 0x10000 &&
pt.y == -1,
"got %d,%d\n",
pt.x,
pt.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
LPVOID NTAPI GlobalLock(HGLOBAL hMem)
HGLOBAL NTAPI GlobalFree(HGLOBAL hMem)
UINT NTAPI GlobalFlags(HGLOBAL hMem)
HGLOBAL NTAPI GlobalAlloc(UINT uFlags, SIZE_T dwBytes)
#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)
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)
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 *)
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)
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)