Author: tkreuzer
Date: Mon Apr 19 21:45:10 2010
New Revision: 46948
URL:
http://svn.reactos.org/svn/reactos?rev=46948&view=rev
Log:
[W32KNAPI]
Patch by Jerome Gardou: more tests for NtGdiBitBlt
Modified:
trunk/rostests/apitests/w32knapi/ntgdi/NtGdiBitBlt.c
Modified: trunk/rostests/apitests/w32knapi/ntgdi/NtGdiBitBlt.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/w32knapi/ntgdi/N…
==============================================================================
--- trunk/rostests/apitests/w32knapi/ntgdi/NtGdiBitBlt.c [iso-8859-1] (original)
+++ trunk/rostests/apitests/w32knapi/ntgdi/NtGdiBitBlt.c [iso-8859-1] Mon Apr 19 21:45:10
2010
@@ -29,6 +29,11 @@
hbmp1 = NtGdiCreateBitmap(2, 2, 1, 32, (LPBYTE)bytes1 );
TEST(hbmp1 != NULL);
hOldBmp1 = SelectObject(hdc1, hbmp1);
+
+ TESTX(NtGdiGetPixel(hdc1, 0, 0) == 0x000000ff, "Pixel[0][0] 0x%08x\n",
(UINT)NtGdiGetPixel(hdc2, 0, 0));
+ TESTX(NtGdiGetPixel(hdc1, 0, 1) == 0x00ff0000, "Pixel[0][1] 0x%08x\n",
(UINT)NtGdiGetPixel(hdc2, 0, 1));
+ TESTX(NtGdiGetPixel(hdc1, 1, 0) == 0x0000ff00, "Pixel[1][0] 0x%08x\n",
(UINT)NtGdiGetPixel(hdc2, 1, 0));
+ TESTX(NtGdiGetPixel(hdc1, 1, 1) == 0x00ffffff, "Pixel[1][1] 0x%08x\n",
(UINT)NtGdiGetPixel(hdc2, 1, 1));
hbmp2 = NtGdiCreateBitmap(2, 2, 1, 32, (LPBYTE)bytes2 );
TEST(hbmp2 != NULL);
@@ -68,7 +73,22 @@
TESTX(NtGdiGetPixel(hdc2, 1, 0) == 0x00000000, "Pixel[1][0] 0x%08x\n",
(UINT)NtGdiGetPixel(hdc2, 1, 0));
TESTX(NtGdiGetPixel(hdc2, 1, 1) == 0x00000000, "Pixel[1][1] 0x%08x\n",
(UINT)NtGdiGetPixel(hdc2, 1, 1));
+ NtGdiSetPixel(hdc2, 0, 0, 0x00000000);
+
bRet = NtGdiBitBlt(hdc2, 2, 2, -2, -2, hdc1, 2, 2, SRCCOPY, 0, 0);
+ TEST(bRet == TRUE);
+ TEST(GetLastError() == ERROR_SUCCESS);
+ TESTX(NtGdiGetPixel(hdc2, 0, 0) == 0x000000ff, "Pixel[0][0] 0x%08x\n",
(UINT)NtGdiGetPixel(hdc2, 0, 0));
+ TESTX(NtGdiGetPixel(hdc2, 0, 1) == 0x00ff0000, "Pixel[0][1] 0x%08x\n",
(UINT)NtGdiGetPixel(hdc2, 0, 1));
+ TESTX(NtGdiGetPixel(hdc2, 1, 0) == 0x0000ff00, "Pixel[1][0] 0x%08x\n",
(UINT)NtGdiGetPixel(hdc2, 1, 0));
+ TESTX(NtGdiGetPixel(hdc2, 1, 1) == 0x00ffffff, "Pixel[1][1] 0x%08x\n",
(UINT)NtGdiGetPixel(hdc2, 1, 1));
+
+ NtGdiSetPixel(hdc2, 0, 0, 0x00000000);
+ NtGdiSetPixel(hdc2, 1, 0, 0x00000000);
+ NtGdiSetPixel(hdc2, 0, 1, 0x00000000);
+ NtGdiSetPixel(hdc2, 1, 1, 0x00000000);
+
+ bRet = NtGdiBitBlt(hdc2, 0, 0, 2, 2, hdc1, 0, 0, SRCCOPY, 0, 0);
TEST(bRet == TRUE);
TEST(GetLastError() == ERROR_SUCCESS);
TESTX(NtGdiGetPixel(hdc2, 0, 0) == 0x000000ff, "Pixel[0][0] 0x%08x\n",
(UINT)NtGdiGetPixel(hdc2, 0, 0));