Updated tests for new gdi_CreateBitmap API.

This commit is contained in:
Armin Novak 2015-08-12 11:15:07 +02:00
parent 253a60aaf3
commit 8024a086cd
5 changed files with 95 additions and 95 deletions

View File

@ -589,64 +589,64 @@ int test_gdi_BitBlt_32bpp(void)
clrconv->palette = hPalette;
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_SRC, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmpSrc = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
hBmpSrc = gdi_CreateBitmap(16, 16, bitsPerPixel, data, _aligned_free);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_DST, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmpDst = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
hBmpDst = gdi_CreateBitmap(16, 16, bitsPerPixel, data, _aligned_free);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_DST, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmpDstOriginal = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
hBmpDstOriginal = gdi_CreateBitmap(16, 16, bitsPerPixel, data, _aligned_free);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_PAT, NULL, 8, 8, 8, bitsPerPixel, clrconv);
hBmpPat = gdi_CreateBitmap(8, 8, bitsPerPixel, data);
hBmpPat = gdi_CreateBitmap(8, 8, bitsPerPixel, data, _aligned_free);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_SRCCOPY, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_SRCCOPY = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
hBmp_SRCCOPY = gdi_CreateBitmap(16, 16, bitsPerPixel, data, _aligned_free);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_SPna, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_SPna = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
hBmp_SPna = gdi_CreateBitmap(16, 16, bitsPerPixel, data, _aligned_free);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_BLACKNESS, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_BLACKNESS = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
hBmp_BLACKNESS = gdi_CreateBitmap(16, 16, bitsPerPixel, data, _aligned_free);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_WHITENESS, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_WHITENESS = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
hBmp_WHITENESS = gdi_CreateBitmap(16, 16, bitsPerPixel, data, _aligned_free);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_SRCAND, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_SRCAND = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
hBmp_SRCAND = gdi_CreateBitmap(16, 16, bitsPerPixel, data, _aligned_free);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_SRCPAINT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_SRCPAINT = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
hBmp_SRCPAINT = gdi_CreateBitmap(16, 16, bitsPerPixel, data, _aligned_free);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_SRCINVERT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_SRCINVERT = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
hBmp_SRCINVERT = gdi_CreateBitmap(16, 16, bitsPerPixel, data, _aligned_free);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_SRCERASE, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_SRCERASE = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
hBmp_SRCERASE = gdi_CreateBitmap(16, 16, bitsPerPixel, data, _aligned_free);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_NOTSRCCOPY, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_NOTSRCCOPY = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
hBmp_NOTSRCCOPY = gdi_CreateBitmap(16, 16, bitsPerPixel, data, _aligned_free);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_NOTSRCERASE, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_NOTSRCERASE = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
hBmp_NOTSRCERASE = gdi_CreateBitmap(16, 16, bitsPerPixel, data, _aligned_free);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_DSTINVERT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_DSTINVERT = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
hBmp_DSTINVERT = gdi_CreateBitmap(16, 16, bitsPerPixel, data, _aligned_free);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_MERGECOPY, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_MERGECOPY = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
hBmp_MERGECOPY = gdi_CreateBitmap(16, 16, bitsPerPixel, data, _aligned_free);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_MERGEPAINT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_MERGEPAINT = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
hBmp_MERGEPAINT = gdi_CreateBitmap(16, 16, bitsPerPixel, data, _aligned_free);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_PATCOPY, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_PATCOPY = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
hBmp_PATCOPY = gdi_CreateBitmap(16, 16, bitsPerPixel, data, _aligned_free);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_PATPAINT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_PATPAINT = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
hBmp_PATPAINT = gdi_CreateBitmap(16, 16, bitsPerPixel, data, _aligned_free);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_PATINVERT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_PATINVERT = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
hBmp_PATINVERT = gdi_CreateBitmap(16, 16, bitsPerPixel, data, _aligned_free);
gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpSrc);
gdi_SelectObject(hdcDst, (HGDIOBJECT) hBmpDst);
@ -1013,64 +1013,64 @@ int test_gdi_BitBlt_16bpp(void)
clrconv->palette = hPalette;
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_SRC, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmpSrc = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
hBmpSrc = gdi_CreateBitmap(16, 16, bitsPerPixel, data, _aligned_free);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_DST, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmpDst = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
hBmpDst = gdi_CreateBitmap(16, 16, bitsPerPixel, data, _aligned_free);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_DST, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmpDstOriginal = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
hBmpDstOriginal = gdi_CreateBitmap(16, 16, bitsPerPixel, data, _aligned_free);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_PAT, NULL, 8, 8, 8, bitsPerPixel, clrconv);
hBmpPat = gdi_CreateBitmap(8, 8, bitsPerPixel, data);
hBmpPat = gdi_CreateBitmap(8, 8, bitsPerPixel, data, _aligned_free);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_SRCCOPY, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_SRCCOPY = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
hBmp_SRCCOPY = gdi_CreateBitmap(16, 16, bitsPerPixel, data, _aligned_free);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_SPna, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_SPna = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
hBmp_SPna = gdi_CreateBitmap(16, 16, bitsPerPixel, data, _aligned_free);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_BLACKNESS, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_BLACKNESS = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
hBmp_BLACKNESS = gdi_CreateBitmap(16, 16, bitsPerPixel, data, _aligned_free);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_WHITENESS, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_WHITENESS = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
hBmp_WHITENESS = gdi_CreateBitmap(16, 16, bitsPerPixel, data, _aligned_free);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_SRCAND, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_SRCAND = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
hBmp_SRCAND = gdi_CreateBitmap(16, 16, bitsPerPixel, data, _aligned_free);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_SRCPAINT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_SRCPAINT = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
hBmp_SRCPAINT = gdi_CreateBitmap(16, 16, bitsPerPixel, data, _aligned_free);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_SRCINVERT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_SRCINVERT = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
hBmp_SRCINVERT = gdi_CreateBitmap(16, 16, bitsPerPixel, data, _aligned_free);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_SRCERASE, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_SRCERASE = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
hBmp_SRCERASE = gdi_CreateBitmap(16, 16, bitsPerPixel, data, _aligned_free);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_NOTSRCCOPY, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_NOTSRCCOPY = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
hBmp_NOTSRCCOPY = gdi_CreateBitmap(16, 16, bitsPerPixel, data, _aligned_free);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_NOTSRCERASE, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_NOTSRCERASE = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
hBmp_NOTSRCERASE = gdi_CreateBitmap(16, 16, bitsPerPixel, data, _aligned_free);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_DSTINVERT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_DSTINVERT = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
hBmp_DSTINVERT = gdi_CreateBitmap(16, 16, bitsPerPixel, data, _aligned_free);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_MERGECOPY, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_MERGECOPY = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
hBmp_MERGECOPY = gdi_CreateBitmap(16, 16, bitsPerPixel, data, _aligned_free);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_MERGEPAINT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_MERGEPAINT = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
hBmp_MERGEPAINT = gdi_CreateBitmap(16, 16, bitsPerPixel, data, _aligned_free);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_PATCOPY, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_PATCOPY = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
hBmp_PATCOPY = gdi_CreateBitmap(16, 16, bitsPerPixel, data, _aligned_free);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_PATPAINT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_PATPAINT = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
hBmp_PATPAINT = gdi_CreateBitmap(16, 16, bitsPerPixel, data, _aligned_free);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_PATINVERT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_PATINVERT = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
hBmp_PATINVERT = gdi_CreateBitmap(16, 16, bitsPerPixel, data, _aligned_free);
gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpSrc);
gdi_SelectObject(hdcDst, (HGDIOBJECT) hBmpDst);
@ -1435,64 +1435,64 @@ int test_gdi_BitBlt_8bpp(void)
clrconv->palette = hPalette;
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_SRC, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmpSrc = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
hBmpSrc = gdi_CreateBitmap(16, 16, bitsPerPixel, data, _aligned_free);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_DST, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmpDst = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
hBmpDst = gdi_CreateBitmap(16, 16, bitsPerPixel, data, _aligned_free);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_DST, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmpDstOriginal = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
hBmpDstOriginal = gdi_CreateBitmap(16, 16, bitsPerPixel, data, _aligned_free);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_PAT, NULL, 8, 8, 8, bitsPerPixel, clrconv);
hBmpPat = gdi_CreateBitmap(8, 8, bitsPerPixel, data);
hBmpPat = gdi_CreateBitmap(8, 8, bitsPerPixel, data, _aligned_free);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_SRCCOPY, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_SRCCOPY = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
hBmp_SRCCOPY = gdi_CreateBitmap(16, 16, bitsPerPixel, data, _aligned_free);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_SPna, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_SPna = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
hBmp_SPna = gdi_CreateBitmap(16, 16, bitsPerPixel, data, _aligned_free);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_BLACKNESS, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_BLACKNESS = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
hBmp_BLACKNESS = gdi_CreateBitmap(16, 16, bitsPerPixel, data, _aligned_free);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_WHITENESS, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_WHITENESS = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
hBmp_WHITENESS = gdi_CreateBitmap(16, 16, bitsPerPixel, data, _aligned_free);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_SRCAND, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_SRCAND = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
hBmp_SRCAND = gdi_CreateBitmap(16, 16, bitsPerPixel, data, _aligned_free);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_SRCPAINT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_SRCPAINT = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
hBmp_SRCPAINT = gdi_CreateBitmap(16, 16, bitsPerPixel, data, _aligned_free);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_SRCINVERT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_SRCINVERT = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
hBmp_SRCINVERT = gdi_CreateBitmap(16, 16, bitsPerPixel, data, _aligned_free);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_SRCERASE, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_SRCERASE = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
hBmp_SRCERASE = gdi_CreateBitmap(16, 16, bitsPerPixel, data, _aligned_free);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_NOTSRCCOPY, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_NOTSRCCOPY = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
hBmp_NOTSRCCOPY = gdi_CreateBitmap(16, 16, bitsPerPixel, data, _aligned_free);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_NOTSRCERASE, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_NOTSRCERASE = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
hBmp_NOTSRCERASE = gdi_CreateBitmap(16, 16, bitsPerPixel, data, _aligned_free);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_DSTINVERT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_DSTINVERT = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
hBmp_DSTINVERT = gdi_CreateBitmap(16, 16, bitsPerPixel, data, _aligned_free);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_MERGECOPY, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_MERGECOPY = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
hBmp_MERGECOPY = gdi_CreateBitmap(16, 16, bitsPerPixel, data, _aligned_free);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_MERGEPAINT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_MERGEPAINT = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
hBmp_MERGEPAINT = gdi_CreateBitmap(16, 16, bitsPerPixel, data, _aligned_free);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_PATCOPY, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_PATCOPY = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
hBmp_PATCOPY = gdi_CreateBitmap(16, 16, bitsPerPixel, data, _aligned_free);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_PATPAINT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_PATPAINT = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
hBmp_PATPAINT = gdi_CreateBitmap(16, 16, bitsPerPixel, data, _aligned_free);
data = (BYTE*) freerdp_image_convert((BYTE*) bmp_PATINVERT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_PATINVERT = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
hBmp_PATINVERT = gdi_CreateBitmap(16, 16, bitsPerPixel, data, _aligned_free);
gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpSrc);
gdi_SelectObject(hdcDst, (HGDIOBJECT) hBmpDst);

View File

@ -28,7 +28,7 @@ int test_gdi_ClipCoords(void)
hdc->bytesPerPixel = 4;
hdc->bitsPerPixel = 32;
bmp = gdi_CreateBitmap(1024, 768, 4, NULL);
bmp = gdi_CreateBitmap(1024, 768, 4, NULL, NULL);
gdi_SelectObject(hdc, (HGDIOBJECT) bmp);
gdi_SetNullClipRgn(hdc);
@ -186,7 +186,7 @@ int test_gdi_InvalidateRegion(void)
hdc->bytesPerPixel = 4;
hdc->bitsPerPixel = 32;
bmp = gdi_CreateBitmap(1024, 768, 4, NULL);
bmp = gdi_CreateBitmap(1024, 768, 4, NULL, NULL);
gdi_SelectObject(hdc, (HGDIOBJECT) bmp);
gdi_SetNullClipRgn(hdc);

View File

@ -83,7 +83,7 @@ int test_gdi_CreateBitmap(void)
return -1;
}
if (!(hBitmap = gdi_CreateBitmap(width, height, bpp, data)))
if (!(hBitmap = gdi_CreateBitmap(width, height, bpp, data, _aligned_free)))
{
printf("gdi_CreateBitmap failed\n");
return -1;
@ -199,7 +199,7 @@ int test_gdi_CreatePatternBrush(void)
HGDI_BRUSH hBrush;
HGDI_BITMAP hBitmap;
hBitmap = gdi_CreateBitmap(64, 64, 32, NULL);
hBitmap = gdi_CreateBitmap(64, 64, 32, NULL, NULL);
hBrush = gdi_CreatePatternBrush(hBitmap);
if (hBrush->objectType != GDIOBJECT_BRUSH)

View File

@ -120,13 +120,13 @@ int TestGdiEllipse(int argc, char* argv[])
clrconv->palette = hPalette;
data = (BYTE*) freerdp_image_convert((BYTE*) ellipse_case_1, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_Ellipse_1 = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
hBmp_Ellipse_1 = gdi_CreateBitmap(16, 16, bitsPerPixel, data, _aligned_free);
data = (BYTE*) freerdp_image_convert((BYTE*) ellipse_case_2, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_Ellipse_2 = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
hBmp_Ellipse_2 = gdi_CreateBitmap(16, 16, bitsPerPixel, data, _aligned_free);
data = (BYTE*) freerdp_image_convert((BYTE*) ellipse_case_3, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_Ellipse_3 = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
hBmp_Ellipse_3 = gdi_CreateBitmap(16, 16, bitsPerPixel, data, _aligned_free);
/* Test Case 1: (0,0) -> (16, 16) */
if (!gdi_BitBlt(hdc, 0, 0, 16, 16, hdc, 0, 0, GDI_WHITENESS))

View File

@ -667,88 +667,88 @@ int TestGdiLine(int argc, char* argv[])
clrconv->palette = hPalette;
data = (BYTE*) freerdp_image_convert((BYTE*) line_to_case_1, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_LineTo_1 = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
hBmp_LineTo_1 = gdi_CreateBitmap(16, 16, bitsPerPixel, data, _aligned_free);
data = (BYTE*) freerdp_image_convert((BYTE*) line_to_case_2, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_LineTo_2 = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
hBmp_LineTo_2 = gdi_CreateBitmap(16, 16, bitsPerPixel, data, _aligned_free);
data = (BYTE*) freerdp_image_convert((BYTE*) line_to_case_3, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_LineTo_3 = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
hBmp_LineTo_3 = gdi_CreateBitmap(16, 16, bitsPerPixel, data, _aligned_free);
data = (BYTE*) freerdp_image_convert((BYTE*) line_to_case_4, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_LineTo_4 = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
hBmp_LineTo_4 = gdi_CreateBitmap(16, 16, bitsPerPixel, data, _aligned_free);
data = (BYTE*) freerdp_image_convert((BYTE*) line_to_case_5, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_LineTo_5 = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
hBmp_LineTo_5 = gdi_CreateBitmap(16, 16, bitsPerPixel, data, _aligned_free);
data = (BYTE*) freerdp_image_convert((BYTE*) line_to_case_5, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_LineTo_5 = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
hBmp_LineTo_5 = gdi_CreateBitmap(16, 16, bitsPerPixel, data, _aligned_free);
data = (BYTE*) freerdp_image_convert((BYTE*) line_to_case_6, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_LineTo_6 = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
hBmp_LineTo_6 = gdi_CreateBitmap(16, 16, bitsPerPixel, data, _aligned_free);
data = (BYTE*) freerdp_image_convert((BYTE*) line_to_case_7, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_LineTo_7 = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
hBmp_LineTo_7 = gdi_CreateBitmap(16, 16, bitsPerPixel, data, _aligned_free);
data = (BYTE*) freerdp_image_convert((BYTE*) line_to_case_8, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_LineTo_8 = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
hBmp_LineTo_8 = gdi_CreateBitmap(16, 16, bitsPerPixel, data, _aligned_free);
data = (BYTE*) freerdp_image_convert((BYTE*) line_to_case_9, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_LineTo_9 = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
hBmp_LineTo_9 = gdi_CreateBitmap(16, 16, bitsPerPixel, data, _aligned_free);
data = (BYTE*) freerdp_image_convert((BYTE*) line_to_case_10, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_LineTo_10 = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
hBmp_LineTo_10 = gdi_CreateBitmap(16, 16, bitsPerPixel, data, _aligned_free);
data = (BYTE*) freerdp_image_convert((BYTE*) line_to_case_11, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_LineTo_11 = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
hBmp_LineTo_11 = gdi_CreateBitmap(16, 16, bitsPerPixel, data, _aligned_free);
data = (BYTE*) freerdp_image_convert((BYTE*) line_to_R2_BLACK, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_LineTo_R2_BLACK = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
hBmp_LineTo_R2_BLACK = gdi_CreateBitmap(16, 16, bitsPerPixel, data, _aligned_free);
data = (BYTE*) freerdp_image_convert((BYTE*) line_to_R2_NOTMERGEPEN, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_LineTo_R2_NOTMERGEPEN = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
hBmp_LineTo_R2_NOTMERGEPEN = gdi_CreateBitmap(16, 16, bitsPerPixel, data, _aligned_free);
data = (BYTE*) freerdp_image_convert((BYTE*) line_to_R2_MASKNOTPEN, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_LineTo_R2_MASKNOTPEN = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
hBmp_LineTo_R2_MASKNOTPEN = gdi_CreateBitmap(16, 16, bitsPerPixel, data, _aligned_free);
data = (BYTE*) freerdp_image_convert((BYTE*) line_to_R2_NOTCOPYPEN, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_LineTo_R2_NOTCOPYPEN = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
hBmp_LineTo_R2_NOTCOPYPEN = gdi_CreateBitmap(16, 16, bitsPerPixel, data, _aligned_free);
data = (BYTE*) freerdp_image_convert((BYTE*) line_to_R2_MASKPENNOT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_LineTo_R2_MASKPENNOT = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
hBmp_LineTo_R2_MASKPENNOT = gdi_CreateBitmap(16, 16, bitsPerPixel, data, _aligned_free);
data = (BYTE*) freerdp_image_convert((BYTE*) line_to_R2_NOT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_LineTo_R2_NOT = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
hBmp_LineTo_R2_NOT = gdi_CreateBitmap(16, 16, bitsPerPixel, data, _aligned_free);
data = (BYTE*) freerdp_image_convert((BYTE*) line_to_R2_XORPEN, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_LineTo_R2_XORPEN = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
hBmp_LineTo_R2_XORPEN = gdi_CreateBitmap(16, 16, bitsPerPixel, data, _aligned_free);
data = (BYTE*) freerdp_image_convert((BYTE*) line_to_R2_NOTMASKPEN, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_LineTo_R2_NOTMASKPEN = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
hBmp_LineTo_R2_NOTMASKPEN = gdi_CreateBitmap(16, 16, bitsPerPixel, data, _aligned_free);
data = (BYTE*) freerdp_image_convert((BYTE*) line_to_R2_MASKPEN, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_LineTo_R2_MASKPEN = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
hBmp_LineTo_R2_MASKPEN = gdi_CreateBitmap(16, 16, bitsPerPixel, data, _aligned_free);
data = (BYTE*) freerdp_image_convert((BYTE*) line_to_R2_NOTXORPEN, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_LineTo_R2_NOTXORPEN = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
hBmp_LineTo_R2_NOTXORPEN = gdi_CreateBitmap(16, 16, bitsPerPixel, data, _aligned_free);
data = (BYTE*) freerdp_image_convert((BYTE*) line_to_R2_NOP, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_LineTo_R2_NOP = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
hBmp_LineTo_R2_NOP = gdi_CreateBitmap(16, 16, bitsPerPixel, data, _aligned_free);
data = (BYTE*) freerdp_image_convert((BYTE*) line_to_R2_MERGENOTPEN, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_LineTo_R2_MERGENOTPEN = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
hBmp_LineTo_R2_MERGENOTPEN = gdi_CreateBitmap(16, 16, bitsPerPixel, data, _aligned_free);
data = (BYTE*) freerdp_image_convert((BYTE*) line_to_R2_COPYPEN, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_LineTo_R2_COPYPEN = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
hBmp_LineTo_R2_COPYPEN = gdi_CreateBitmap(16, 16, bitsPerPixel, data, _aligned_free);
data = (BYTE*) freerdp_image_convert((BYTE*) line_to_R2_MERGEPENNOT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_LineTo_R2_MERGEPENNOT = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
hBmp_LineTo_R2_MERGEPENNOT = gdi_CreateBitmap(16, 16, bitsPerPixel, data, _aligned_free);
data = (BYTE*) freerdp_image_convert((BYTE*) line_to_R2_MERGEPEN, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_LineTo_R2_MERGEPEN = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
hBmp_LineTo_R2_MERGEPEN = gdi_CreateBitmap(16, 16, bitsPerPixel, data, _aligned_free);
data = (BYTE*) freerdp_image_convert((BYTE*) line_to_R2_WHITE, NULL, 16, 16, 8, bitsPerPixel, clrconv);
hBmp_LineTo_R2_WHITE = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
hBmp_LineTo_R2_WHITE = gdi_CreateBitmap(16, 16, bitsPerPixel, data, _aligned_free);
/* Test Case 1: (0,0) -> (15, 15) */
if (!gdi_BitBlt(hdc, 0, 0, 16, 16, hdc, 0, 0, GDI_WHITENESS))