mirror of
https://github.com/FreeRDP/FreeRDP.git
synced 2024-11-27 11:54:44 +08:00
libfreerdp-gdi: port old cunit gdi tests to ctest
This commit is contained in:
parent
eb20d0f770
commit
5f96f50e0d
@ -5,7 +5,13 @@ set(MODULE_PREFIX "TEST_GDI")
|
||||
set(${MODULE_PREFIX}_DRIVER ${MODULE_NAME}.c)
|
||||
|
||||
set(${MODULE_PREFIX}_TESTS
|
||||
TestGdiRop3.c)
|
||||
TestGdiRop3.c
|
||||
TestGdiLine.c
|
||||
TestGdiRect.c
|
||||
TestGdiBitBlt.c
|
||||
TestGdiCreate.c
|
||||
TestGdiEllipse.c
|
||||
TestGdiClip.c)
|
||||
|
||||
create_test_sourcelist(${MODULE_PREFIX}_SRCS
|
||||
${${MODULE_PREFIX}_DRIVER}
|
||||
@ -15,7 +21,7 @@ include_directories(..)
|
||||
|
||||
add_executable(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
|
||||
|
||||
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} ${CMOCKERY_LIBRARIES})
|
||||
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS})
|
||||
|
||||
set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS
|
||||
MONOLITHIC ${MONOLITHIC_BUILD}
|
||||
@ -36,5 +42,5 @@ foreach(test ${${MODULE_PREFIX}_TESTS})
|
||||
add_test(${TestName} ${TESTING_OUTPUT_DIRECTORY}/${MODULE_NAME} ${TestName})
|
||||
endforeach()
|
||||
|
||||
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "WinPR/Test")
|
||||
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "FreeRDP/Test")
|
||||
|
||||
|
1417
libfreerdp/gdi/test/TestGdiBitBlt.c
Normal file
1417
libfreerdp/gdi/test/TestGdiBitBlt.c
Normal file
File diff suppressed because it is too large
Load Diff
349
libfreerdp/gdi/test/TestGdiClip.c
Normal file
349
libfreerdp/gdi/test/TestGdiClip.c
Normal file
@ -0,0 +1,349 @@
|
||||
|
||||
#include <freerdp/gdi/gdi.h>
|
||||
|
||||
#include <freerdp/gdi/dc.h>
|
||||
#include <freerdp/gdi/pen.h>
|
||||
#include <freerdp/gdi/line.h>
|
||||
#include <freerdp/gdi/brush.h>
|
||||
#include <freerdp/gdi/region.h>
|
||||
#include <freerdp/gdi/bitmap.h>
|
||||
#include <freerdp/gdi/drawing.h>
|
||||
#include <freerdp/gdi/clipping.h>
|
||||
|
||||
#include <winpr/crt.h>
|
||||
|
||||
int test_gdi_ClipCoords(void)
|
||||
{
|
||||
int draw;
|
||||
HGDI_DC hdc;
|
||||
HGDI_RGN rgn1;
|
||||
HGDI_RGN rgn2;
|
||||
HGDI_BITMAP bmp;
|
||||
|
||||
hdc = gdi_GetDC();
|
||||
hdc->bytesPerPixel = 4;
|
||||
hdc->bitsPerPixel = 32;
|
||||
bmp = gdi_CreateBitmap(1024, 768, 4, NULL);
|
||||
gdi_SelectObject(hdc, (HGDIOBJECT) bmp);
|
||||
gdi_SetNullClipRgn(hdc);
|
||||
|
||||
rgn1 = gdi_CreateRectRgn(0, 0, 0, 0);
|
||||
rgn2 = gdi_CreateRectRgn(0, 0, 0, 0);
|
||||
rgn1->null = 1;
|
||||
rgn2->null = 1;
|
||||
|
||||
/* null clipping region */
|
||||
gdi_SetNullClipRgn(hdc);
|
||||
gdi_SetRgn(rgn1, 20, 20, 100, 100);
|
||||
gdi_SetRgn(rgn2, 20, 20, 100, 100);
|
||||
|
||||
gdi_ClipCoords(hdc, &(rgn1->x), &(rgn1->y), &(rgn1->w), &(rgn1->h), NULL, NULL);
|
||||
|
||||
if (gdi_EqualRgn(rgn1, rgn2) != 1)
|
||||
return -1;
|
||||
|
||||
/* region all inside clipping region */
|
||||
gdi_SetClipRgn(hdc, 0, 0, 1024, 768);
|
||||
gdi_SetRgn(rgn1, 20, 20, 100, 100);
|
||||
gdi_SetRgn(rgn2, 20, 20, 100, 100);
|
||||
|
||||
gdi_ClipCoords(hdc, &(rgn1->x), &(rgn1->y), &(rgn1->w), &(rgn1->h), NULL, NULL);
|
||||
|
||||
if (gdi_EqualRgn(rgn1, rgn2) != 1)
|
||||
return -1;
|
||||
|
||||
/* region all outside clipping region, on the left */
|
||||
gdi_SetClipRgn(hdc, 300, 300, 100, 100);
|
||||
gdi_SetRgn(rgn1, 20, 20, 100, 100);
|
||||
gdi_SetRgn(rgn2, 0, 0, 0, 0);
|
||||
|
||||
draw = gdi_ClipCoords(hdc, &(rgn1->x), &(rgn1->y), &(rgn1->w), &(rgn1->h), NULL, NULL);
|
||||
|
||||
if (draw != 0)
|
||||
return -1;
|
||||
|
||||
/* region all outside clipping region, on the right */
|
||||
gdi_SetClipRgn(hdc, 300, 300, 100, 100);
|
||||
gdi_SetRgn(rgn1, 420, 420, 100, 100);
|
||||
gdi_SetRgn(rgn2, 0, 0, 0, 0);
|
||||
|
||||
draw = gdi_ClipCoords(hdc, &(rgn1->x), &(rgn1->y), &(rgn1->w), &(rgn1->h), NULL, NULL);
|
||||
|
||||
if (draw != 0)
|
||||
return -1;
|
||||
|
||||
/* region all outside clipping region, on top */
|
||||
gdi_SetClipRgn(hdc, 300, 300, 100, 100);
|
||||
gdi_SetRgn(rgn1, 300, 20, 100, 100);
|
||||
gdi_SetRgn(rgn2, 0, 0, 0, 0);
|
||||
|
||||
draw = gdi_ClipCoords(hdc, &(rgn1->x), &(rgn1->y), &(rgn1->w), &(rgn1->h), NULL, NULL);
|
||||
|
||||
if (draw != 0)
|
||||
return -1;
|
||||
|
||||
/* region all outside clipping region, at the bottom */
|
||||
gdi_SetClipRgn(hdc, 300, 300, 100, 100);
|
||||
gdi_SetRgn(rgn1, 300, 420, 100, 100);
|
||||
gdi_SetRgn(rgn2, 0, 0, 0, 0);
|
||||
|
||||
draw = gdi_ClipCoords(hdc, &(rgn1->x), &(rgn1->y), &(rgn1->w), &(rgn1->h), NULL, NULL);
|
||||
|
||||
if (draw != 0)
|
||||
return -1;
|
||||
|
||||
/* left outside, right = clip, top = clip, bottom = clip */
|
||||
gdi_SetClipRgn(hdc, 300, 300, 100, 100);
|
||||
gdi_SetRgn(rgn1, 100, 300, 300, 100);
|
||||
gdi_SetRgn(rgn2, 300, 300, 100, 100);
|
||||
|
||||
gdi_ClipCoords(hdc, &(rgn1->x), &(rgn1->y), &(rgn1->w), &(rgn1->h), NULL, NULL);
|
||||
|
||||
if (gdi_EqualRgn(rgn1, rgn2) != 1)
|
||||
return -1;
|
||||
|
||||
/* left outside, right inside, top = clip, bottom = clip */
|
||||
gdi_SetClipRgn(hdc, 300, 300, 100, 100);
|
||||
gdi_SetRgn(rgn1, 100, 300, 250, 100);
|
||||
gdi_SetRgn(rgn2, 300, 300, 50, 100);
|
||||
|
||||
gdi_ClipCoords(hdc, &(rgn1->x), &(rgn1->y), &(rgn1->w), &(rgn1->h), NULL, NULL);
|
||||
|
||||
if (gdi_EqualRgn(rgn1, rgn2) != 1)
|
||||
return -1;
|
||||
|
||||
/* left = clip, right outside, top = clip, bottom = clip */
|
||||
gdi_SetClipRgn(hdc, 300, 300, 100, 100);
|
||||
gdi_SetRgn(rgn1, 300, 300, 300, 100);
|
||||
gdi_SetRgn(rgn2, 300, 300, 100, 100);
|
||||
|
||||
gdi_ClipCoords(hdc, &(rgn1->x), &(rgn1->y), &(rgn1->w), &(rgn1->h), NULL, NULL);
|
||||
|
||||
if (gdi_EqualRgn(rgn1, rgn2) != 1)
|
||||
return -1;
|
||||
|
||||
/* left inside, right outside, top = clip, bottom = clip */
|
||||
gdi_SetClipRgn(hdc, 300, 300, 100, 100);
|
||||
gdi_SetRgn(rgn1, 350, 300, 200, 100);
|
||||
gdi_SetRgn(rgn2, 350, 300, 50, 100);
|
||||
|
||||
gdi_ClipCoords(hdc, &(rgn1->x), &(rgn1->y), &(rgn1->w), &(rgn1->h), NULL, NULL);
|
||||
|
||||
if (gdi_EqualRgn(rgn1, rgn2) != 1)
|
||||
return -1;
|
||||
|
||||
/* top outside, bottom = clip, left = clip, right = clip */
|
||||
gdi_SetClipRgn(hdc, 300, 300, 100, 100);
|
||||
gdi_SetRgn(rgn1, 300, 100, 300, 300);
|
||||
gdi_SetRgn(rgn2, 300, 300, 100, 100);
|
||||
|
||||
gdi_ClipCoords(hdc, &(rgn1->x), &(rgn1->y), &(rgn1->w), &(rgn1->h), NULL, NULL);
|
||||
|
||||
if (gdi_EqualRgn(rgn1, rgn2) != 1)
|
||||
return -1;
|
||||
|
||||
/* top = clip, bottom outside, left = clip, right = clip */
|
||||
gdi_SetClipRgn(hdc, 300, 300, 100, 100);
|
||||
gdi_SetRgn(rgn1, 300, 300, 100, 200);
|
||||
gdi_SetRgn(rgn2, 300, 300, 100, 100);
|
||||
|
||||
gdi_ClipCoords(hdc, &(rgn1->x), &(rgn1->y), &(rgn1->w), &(rgn1->h), NULL, NULL);
|
||||
|
||||
if (gdi_EqualRgn(rgn1, rgn2) != 1)
|
||||
return -1;
|
||||
|
||||
/* top = clip, bottom = clip, top = clip, bottom = clip */
|
||||
gdi_SetClipRgn(hdc, 300, 300, 100, 100);
|
||||
gdi_SetRgn(rgn1, 300, 300, 100, 100);
|
||||
gdi_SetRgn(rgn2, 300, 300, 100, 100);
|
||||
|
||||
gdi_ClipCoords(hdc, &(rgn1->x), &(rgn1->y), &(rgn1->w), &(rgn1->h), NULL, NULL);
|
||||
|
||||
if (gdi_EqualRgn(rgn1, rgn2) != 1)
|
||||
return -1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int test_gdi_InvalidateRegion(void)
|
||||
{
|
||||
HGDI_DC hdc;
|
||||
HGDI_RGN rgn1;
|
||||
HGDI_RGN rgn2;
|
||||
HGDI_RGN invalid;
|
||||
HGDI_BITMAP bmp;
|
||||
|
||||
hdc = gdi_GetDC();
|
||||
hdc->bytesPerPixel = 4;
|
||||
hdc->bitsPerPixel = 32;
|
||||
bmp = gdi_CreateBitmap(1024, 768, 4, NULL);
|
||||
gdi_SelectObject(hdc, (HGDIOBJECT) bmp);
|
||||
gdi_SetNullClipRgn(hdc);
|
||||
|
||||
hdc->hwnd = (HGDI_WND) malloc(sizeof(GDI_WND));
|
||||
hdc->hwnd->invalid = gdi_CreateRectRgn(0, 0, 0, 0);
|
||||
hdc->hwnd->invalid->null = 1;
|
||||
invalid = hdc->hwnd->invalid;
|
||||
|
||||
hdc->hwnd->count = 16;
|
||||
hdc->hwnd->cinvalid = (HGDI_RGN) malloc(sizeof(GDI_RGN) * hdc->hwnd->count);
|
||||
|
||||
rgn1 = gdi_CreateRectRgn(0, 0, 0, 0);
|
||||
rgn2 = gdi_CreateRectRgn(0, 0, 0, 0);
|
||||
rgn1->null = 1;
|
||||
rgn2->null = 1;
|
||||
|
||||
/* no previous invalid region */
|
||||
invalid->null = 1;
|
||||
gdi_SetRgn(rgn1, 300, 300, 100, 100);
|
||||
gdi_SetRgn(rgn2, 300, 300, 100, 100);
|
||||
|
||||
gdi_InvalidateRegion(hdc, rgn1->x, rgn1->y, rgn1->w, rgn1->h);
|
||||
|
||||
if (gdi_EqualRgn(invalid, rgn2) != 1)
|
||||
return -1;
|
||||
|
||||
/* region same as invalid region */
|
||||
gdi_SetRgn(invalid, 300, 300, 100, 100);
|
||||
gdi_SetRgn(rgn1, 300, 300, 100, 100);
|
||||
gdi_SetRgn(rgn2, 300, 300, 100, 100);
|
||||
|
||||
gdi_InvalidateRegion(hdc, rgn1->x, rgn1->y, rgn1->w, rgn1->h);
|
||||
|
||||
if (gdi_EqualRgn(invalid, rgn2) != 1)
|
||||
return -1;
|
||||
|
||||
/* left outside */
|
||||
gdi_SetRgn(invalid, 300, 300, 100, 100);
|
||||
gdi_SetRgn(rgn1, 100, 300, 300, 100);
|
||||
gdi_SetRgn(rgn2, 100, 300, 300, 100);
|
||||
|
||||
gdi_InvalidateRegion(hdc, rgn1->x, rgn1->y, rgn1->w, rgn1->h);
|
||||
|
||||
if (gdi_EqualRgn(invalid, rgn2) != 1)
|
||||
return -1;
|
||||
|
||||
/* right outside */
|
||||
gdi_SetRgn(invalid, 300, 300, 100, 100);
|
||||
gdi_SetRgn(rgn1, 300, 300, 300, 100);
|
||||
gdi_SetRgn(rgn2, 300, 300, 300, 100);
|
||||
|
||||
gdi_InvalidateRegion(hdc, rgn1->x, rgn1->y, rgn1->w, rgn1->h);
|
||||
|
||||
if (gdi_EqualRgn(invalid, rgn2) != 1)
|
||||
return -1;
|
||||
|
||||
/* top outside */
|
||||
gdi_SetRgn(invalid, 300, 300, 100, 100);
|
||||
gdi_SetRgn(rgn1, 300, 100, 100, 300);
|
||||
gdi_SetRgn(rgn2, 300, 100, 100, 300);
|
||||
|
||||
gdi_InvalidateRegion(hdc, rgn1->x, rgn1->y, rgn1->w, rgn1->h);
|
||||
|
||||
if (gdi_EqualRgn(invalid, rgn2) != 1)
|
||||
return -1;
|
||||
|
||||
/* bottom outside */
|
||||
gdi_SetRgn(invalid, 300, 300, 100, 100);
|
||||
gdi_SetRgn(rgn1, 300, 300, 100, 300);
|
||||
gdi_SetRgn(rgn2, 300, 300, 100, 300);
|
||||
|
||||
gdi_InvalidateRegion(hdc, rgn1->x, rgn1->y, rgn1->w, rgn1->h);
|
||||
|
||||
if (gdi_EqualRgn(invalid, rgn2) != 1)
|
||||
return -1;
|
||||
|
||||
/* left outside, right outside */
|
||||
gdi_SetRgn(invalid, 300, 300, 100, 100);
|
||||
gdi_SetRgn(rgn1, 100, 300, 600, 300);
|
||||
gdi_SetRgn(rgn2, 100, 300, 600, 300);
|
||||
|
||||
gdi_InvalidateRegion(hdc, rgn1->x, rgn1->y, rgn1->w, rgn1->h);
|
||||
|
||||
if (gdi_EqualRgn(invalid, rgn2) != 1)
|
||||
return -1;
|
||||
|
||||
/* top outside, bottom outside */
|
||||
gdi_SetRgn(invalid, 300, 300, 100, 100);
|
||||
gdi_SetRgn(rgn1, 300, 100, 100, 500);
|
||||
gdi_SetRgn(rgn2, 300, 100, 100, 500);
|
||||
|
||||
gdi_InvalidateRegion(hdc, rgn1->x, rgn1->y, rgn1->w, rgn1->h);
|
||||
|
||||
if (gdi_EqualRgn(invalid, rgn2) != 1)
|
||||
return -1;
|
||||
|
||||
/* all outside, left */
|
||||
gdi_SetRgn(invalid, 300, 300, 100, 100);
|
||||
gdi_SetRgn(rgn1, 100, 300, 100, 100);
|
||||
gdi_SetRgn(rgn2, 100, 300, 300, 100);
|
||||
|
||||
gdi_InvalidateRegion(hdc, rgn1->x, rgn1->y, rgn1->w, rgn1->h);
|
||||
|
||||
if (gdi_EqualRgn(invalid, rgn2) != 1)
|
||||
return -1;
|
||||
|
||||
/* all outside, right */
|
||||
gdi_SetRgn(invalid, 300, 300, 100, 100);
|
||||
gdi_SetRgn(rgn1, 700, 300, 100, 100);
|
||||
gdi_SetRgn(rgn2, 300, 300, 500, 100);
|
||||
|
||||
gdi_InvalidateRegion(hdc, rgn1->x, rgn1->y, rgn1->w, rgn1->h);
|
||||
|
||||
if (gdi_EqualRgn(invalid, rgn2) != 1)
|
||||
return -1;
|
||||
|
||||
/* all outside, top */
|
||||
gdi_SetRgn(invalid, 300, 300, 100, 100);
|
||||
gdi_SetRgn(rgn1, 300, 100, 100, 100);
|
||||
gdi_SetRgn(rgn2, 300, 100, 100, 300);
|
||||
|
||||
gdi_InvalidateRegion(hdc, rgn1->x, rgn1->y, rgn1->w, rgn1->h);
|
||||
|
||||
if (gdi_EqualRgn(invalid, rgn2) != 1)
|
||||
return -1;
|
||||
|
||||
/* all outside, bottom */
|
||||
gdi_SetRgn(invalid, 300, 300, 100, 100);
|
||||
gdi_SetRgn(rgn1, 300, 500, 100, 100);
|
||||
gdi_SetRgn(rgn2, 300, 300, 100, 300);
|
||||
|
||||
gdi_InvalidateRegion(hdc, rgn1->x, rgn1->y, rgn1->w, rgn1->h);
|
||||
|
||||
if (gdi_EqualRgn(invalid, rgn2) != 1)
|
||||
return -1;
|
||||
|
||||
/* all outside */
|
||||
gdi_SetRgn(invalid, 300, 300, 100, 100);
|
||||
gdi_SetRgn(rgn1, 100, 100, 600, 600);
|
||||
gdi_SetRgn(rgn2, 100, 100, 600, 600);
|
||||
|
||||
gdi_InvalidateRegion(hdc, rgn1->x, rgn1->y, rgn1->w, rgn1->h);
|
||||
|
||||
if (gdi_EqualRgn(invalid, rgn2) != 1)
|
||||
return -1;
|
||||
|
||||
/* everything */
|
||||
gdi_SetRgn(invalid, 300, 300, 100, 100);
|
||||
gdi_SetRgn(rgn1, 0, 0, 1024, 768);
|
||||
gdi_SetRgn(rgn2, 0, 0, 1024, 768);
|
||||
|
||||
gdi_InvalidateRegion(hdc, rgn1->x, rgn1->y, rgn1->w, rgn1->h);
|
||||
|
||||
if (gdi_EqualRgn(invalid, rgn2) != 1)
|
||||
return -1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int TestGdiClip(int argc, char* argv[])
|
||||
{
|
||||
if (test_gdi_ClipCoords() < 0)
|
||||
return -1;
|
||||
|
||||
if (test_gdi_InvalidateRegion() < 0)
|
||||
return -1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
419
libfreerdp/gdi/test/TestGdiCreate.c
Normal file
419
libfreerdp/gdi/test/TestGdiCreate.c
Normal file
@ -0,0 +1,419 @@
|
||||
|
||||
#include <freerdp/gdi/gdi.h>
|
||||
|
||||
#include <freerdp/gdi/dc.h>
|
||||
#include <freerdp/gdi/pen.h>
|
||||
#include <freerdp/gdi/line.h>
|
||||
#include <freerdp/gdi/brush.h>
|
||||
#include <freerdp/gdi/region.h>
|
||||
#include <freerdp/gdi/bitmap.h>
|
||||
#include <freerdp/gdi/drawing.h>
|
||||
|
||||
#include <winpr/crt.h>
|
||||
|
||||
int test_gdi_GetDC(void)
|
||||
{
|
||||
HGDI_DC hdc = gdi_GetDC();
|
||||
|
||||
if (hdc->bytesPerPixel != 4)
|
||||
return -1;
|
||||
|
||||
if (hdc->bitsPerPixel != 32)
|
||||
return -1;
|
||||
|
||||
if (hdc->drawMode != GDI_R2_BLACK)
|
||||
return -1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int test_gdi_CreateCompatibleDC(void)
|
||||
{
|
||||
HGDI_DC hdc;
|
||||
HGDI_DC chdc;
|
||||
|
||||
hdc = gdi_GetDC();
|
||||
hdc->bytesPerPixel = 2;
|
||||
hdc->bitsPerPixel = 16;
|
||||
hdc->drawMode = GDI_R2_XORPEN;
|
||||
|
||||
chdc = gdi_CreateCompatibleDC(hdc);
|
||||
|
||||
if (chdc->bytesPerPixel != hdc->bytesPerPixel)
|
||||
return -1;
|
||||
|
||||
if (chdc->bitsPerPixel != hdc->bitsPerPixel)
|
||||
return -1;
|
||||
|
||||
if (chdc->drawMode != hdc->drawMode)
|
||||
return -1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int test_gdi_CreateBitmap(void)
|
||||
{
|
||||
int bpp;
|
||||
int width;
|
||||
int height;
|
||||
BYTE* data;
|
||||
HGDI_BITMAP hBitmap;
|
||||
|
||||
bpp = 32;
|
||||
width = 32;
|
||||
height = 16;
|
||||
data = (BYTE*) malloc(width * height * 4);
|
||||
hBitmap = gdi_CreateBitmap(width, height, bpp, data);
|
||||
|
||||
if (hBitmap->objectType != GDIOBJECT_BITMAP)
|
||||
return -1;
|
||||
|
||||
if (hBitmap->bitsPerPixel != bpp)
|
||||
return -1;
|
||||
|
||||
if (hBitmap->width != width)
|
||||
return -1;
|
||||
|
||||
if (hBitmap->height != height)
|
||||
return -1;
|
||||
|
||||
if (hBitmap->data != data)
|
||||
return -1;
|
||||
|
||||
gdi_DeleteObject((HGDIOBJECT) hBitmap);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int test_gdi_CreateCompatibleBitmap(void)
|
||||
{
|
||||
HGDI_DC hdc;
|
||||
int width;
|
||||
int height;
|
||||
HGDI_BITMAP hBitmap;
|
||||
|
||||
hdc = gdi_GetDC();
|
||||
hdc->bytesPerPixel = 4;
|
||||
hdc->bitsPerPixel = 32;
|
||||
|
||||
width = 32;
|
||||
height = 16;
|
||||
hBitmap = gdi_CreateCompatibleBitmap(hdc, width, height);
|
||||
|
||||
if (hBitmap->objectType != GDIOBJECT_BITMAP)
|
||||
return -1;
|
||||
|
||||
if (hBitmap->bytesPerPixel != hdc->bytesPerPixel)
|
||||
return -1;
|
||||
|
||||
if (hBitmap->bitsPerPixel != hdc->bitsPerPixel)
|
||||
return -1;
|
||||
|
||||
if (hBitmap->width != width)
|
||||
return -1;
|
||||
|
||||
if (hBitmap->height != height)
|
||||
return -1;
|
||||
|
||||
if (!hBitmap->data)
|
||||
return -1;
|
||||
|
||||
gdi_DeleteObject((HGDIOBJECT) hBitmap);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int test_gdi_CreatePen(void)
|
||||
{
|
||||
HGDI_PEN hPen = gdi_CreatePen(GDI_PS_SOLID, 8, 0xAABBCCDD);
|
||||
|
||||
if (hPen->style != GDI_PS_SOLID)
|
||||
return -1;
|
||||
|
||||
if (hPen->width != 8)
|
||||
return -1;
|
||||
|
||||
if (hPen->color != 0xAABBCCDD)
|
||||
return -1;
|
||||
|
||||
gdi_DeleteObject((HGDIOBJECT) hPen);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int test_gdi_CreateSolidBrush(void)
|
||||
{
|
||||
HGDI_BRUSH hBrush = gdi_CreateSolidBrush(0xAABBCCDD);
|
||||
|
||||
if (hBrush->objectType != GDIOBJECT_BRUSH)
|
||||
return -1;
|
||||
|
||||
if (hBrush->style != GDI_BS_SOLID)
|
||||
return -1;
|
||||
|
||||
if (hBrush->color != 0xAABBCCDD)
|
||||
return -1;
|
||||
|
||||
gdi_DeleteObject((HGDIOBJECT) hBrush);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int test_gdi_CreatePatternBrush(void)
|
||||
{
|
||||
HGDI_BRUSH hBrush;
|
||||
HGDI_BITMAP hBitmap;
|
||||
|
||||
hBitmap = gdi_CreateBitmap(64, 64, 32, NULL);
|
||||
hBrush = gdi_CreatePatternBrush(hBitmap);
|
||||
|
||||
if (hBrush->objectType != GDIOBJECT_BRUSH)
|
||||
return -1;
|
||||
|
||||
if (hBrush->style != GDI_BS_PATTERN)
|
||||
return -1;
|
||||
|
||||
if (hBrush->pattern != hBitmap)
|
||||
return -1;
|
||||
|
||||
gdi_DeleteObject((HGDIOBJECT) hBitmap);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int test_gdi_CreateRectRgn(void)
|
||||
{
|
||||
int x1 = 32;
|
||||
int y1 = 64;
|
||||
int x2 = 128;
|
||||
int y2 = 256;
|
||||
|
||||
HGDI_RGN hRegion = gdi_CreateRectRgn(x1, y1, x2, y2);
|
||||
|
||||
if (hRegion->objectType != GDIOBJECT_REGION)
|
||||
return -1;
|
||||
|
||||
if (hRegion->x != x1)
|
||||
return -1;
|
||||
|
||||
if (hRegion->y != y1)
|
||||
return -1;
|
||||
|
||||
if (hRegion->w != x2 - x1 + 1)
|
||||
return -1;
|
||||
|
||||
if (hRegion->h != y2 - y1 + 1)
|
||||
return -1;
|
||||
|
||||
if (hRegion->null)
|
||||
return -1;
|
||||
|
||||
gdi_DeleteObject((HGDIOBJECT) hRegion);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int test_gdi_CreateRect(void)
|
||||
{
|
||||
int x1 = 32;
|
||||
int y1 = 64;
|
||||
int x2 = 128;
|
||||
int y2 = 256;
|
||||
|
||||
HGDI_RECT hRect = gdi_CreateRect(x1, y1, x2, y2);
|
||||
|
||||
if (hRect->objectType != GDIOBJECT_RECT)
|
||||
return -1;
|
||||
|
||||
if (hRect->left != x1)
|
||||
return -1;
|
||||
|
||||
if (hRect->top != y1)
|
||||
return -1;
|
||||
|
||||
if (hRect->right != x2)
|
||||
return -1;
|
||||
|
||||
if (hRect->bottom != y2)
|
||||
return -1;
|
||||
|
||||
gdi_DeleteObject((HGDIOBJECT) hRect);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int test_gdi_GetPixel(void)
|
||||
{
|
||||
HGDI_DC hdc;
|
||||
int width = 128;
|
||||
int height = 64;
|
||||
HGDI_BITMAP hBitmap;
|
||||
|
||||
hdc = gdi_GetDC();
|
||||
hdc->bytesPerPixel = 4;
|
||||
hdc->bitsPerPixel = 32;
|
||||
|
||||
hBitmap = gdi_CreateCompatibleBitmap(hdc, width, height);
|
||||
gdi_SelectObject(hdc, (HGDIOBJECT) hBitmap);
|
||||
|
||||
hBitmap->data[(64 * width * 4) + 32 * 4 + 0] = 0xDD;
|
||||
hBitmap->data[(64 * width * 4) + 32 * 4 + 1] = 0xCC;
|
||||
hBitmap->data[(64 * width * 4) + 32 * 4 + 2] = 0xBB;
|
||||
hBitmap->data[(64 * width * 4) + 32 * 4 + 3] = 0xAA;
|
||||
|
||||
if (gdi_GetPixel(hdc, 32, 64) != 0xAABBCCDD)
|
||||
return -1;
|
||||
|
||||
gdi_DeleteObject((HGDIOBJECT) hBitmap);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int test_gdi_SetPixel(void)
|
||||
{
|
||||
HGDI_DC hdc;
|
||||
int width = 128;
|
||||
int height = 64;
|
||||
HGDI_BITMAP hBitmap;
|
||||
|
||||
hdc = gdi_GetDC();
|
||||
hdc->bytesPerPixel = 4;
|
||||
hdc->bitsPerPixel = 32;
|
||||
|
||||
hBitmap = gdi_CreateCompatibleBitmap(hdc, width, height);
|
||||
gdi_SelectObject(hdc, (HGDIOBJECT) hBitmap);
|
||||
|
||||
gdi_SetPixel(hdc, 32, 64, 0xAABBCCDD);
|
||||
|
||||
if (gdi_GetPixel(hdc, 32, 64) != 0xAABBCCDD)
|
||||
return -1;
|
||||
|
||||
gdi_SetPixel(hdc, width - 1, height - 1, 0xAABBCCDD);
|
||||
|
||||
if (gdi_GetPixel(hdc, width - 1, height - 1) != 0xAABBCCDD)
|
||||
return -1;
|
||||
|
||||
gdi_DeleteObject((HGDIOBJECT) hBitmap);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int test_gdi_SetROP2(void)
|
||||
{
|
||||
HGDI_DC hdc = gdi_GetDC();
|
||||
|
||||
gdi_SetROP2(hdc, GDI_R2_BLACK);
|
||||
|
||||
if (hdc->drawMode != GDI_R2_BLACK)
|
||||
return -1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int test_gdi_MoveToEx(void)
|
||||
{
|
||||
HGDI_DC hdc;
|
||||
HGDI_PEN hPen;
|
||||
HGDI_POINT prevPoint;
|
||||
|
||||
hdc = gdi_GetDC();
|
||||
hPen = gdi_CreatePen(GDI_PS_SOLID, 8, 0xAABBCCDD);
|
||||
gdi_SelectObject(hdc, (HGDIOBJECT) hPen);
|
||||
gdi_MoveToEx(hdc, 128, 256, NULL);
|
||||
|
||||
if (hdc->pen->posX != 128)
|
||||
return -1;
|
||||
|
||||
if (hdc->pen->posY != 256)
|
||||
return -1;
|
||||
|
||||
prevPoint = (HGDI_POINT) malloc(sizeof(GDI_POINT));
|
||||
ZeroMemory(prevPoint, sizeof(GDI_POINT));
|
||||
|
||||
gdi_MoveToEx(hdc, 64, 128, prevPoint);
|
||||
|
||||
if (prevPoint->x != 128)
|
||||
return -1;
|
||||
|
||||
if (prevPoint->y != 256)
|
||||
return -1;
|
||||
|
||||
if (hdc->pen->posX != 64)
|
||||
return -1;
|
||||
|
||||
if (hdc->pen->posY != 128)
|
||||
return -1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int TestGdiCreate(int argc, char* argv[])
|
||||
{
|
||||
fprintf(stderr, "test_gdi_GetDC()\n");
|
||||
|
||||
if (test_gdi_GetDC() < 0)
|
||||
return -1;
|
||||
|
||||
fprintf(stderr, "test_gdi_CreateCompatibleDC()\n");
|
||||
|
||||
if (test_gdi_CreateCompatibleDC() < 0)
|
||||
return -1;
|
||||
|
||||
fprintf(stderr, "test_gdi_CreateBitmap()\n");
|
||||
|
||||
if (test_gdi_CreateBitmap() < 0)
|
||||
return -1;
|
||||
|
||||
fprintf(stderr, "test_gdi_CreateCompatibleBitmap()\n");
|
||||
|
||||
if (test_gdi_CreateCompatibleBitmap() < 0)
|
||||
return -1;
|
||||
|
||||
fprintf(stderr, "test_gdi_CreatePen()\n");
|
||||
|
||||
if (test_gdi_CreatePen() < 0)
|
||||
return -1;
|
||||
|
||||
fprintf(stderr, "test_gdi_CreateSolidBrush()\n");
|
||||
|
||||
if (test_gdi_CreateSolidBrush() < 0)
|
||||
return -1;
|
||||
|
||||
fprintf(stderr, "test_gdi_CreatePatternBrush()\n");
|
||||
|
||||
if (test_gdi_CreatePatternBrush() < 0)
|
||||
return -1;
|
||||
|
||||
fprintf(stderr, "test_gdi_CreateRectRgn()\n");
|
||||
|
||||
if (test_gdi_CreateRectRgn() < 0)
|
||||
return -1;
|
||||
|
||||
fprintf(stderr, "test_gdi_CreateRect()\n");
|
||||
|
||||
if (test_gdi_CreateRect() < 0)
|
||||
return -1;
|
||||
|
||||
fprintf(stderr, "test_gdi_GetPixel()\n");
|
||||
|
||||
if (test_gdi_GetPixel() < 0)
|
||||
return -1;
|
||||
|
||||
fprintf(stderr, "test_gdi_SetPixel()\n");
|
||||
|
||||
if (test_gdi_SetPixel() < 0)
|
||||
return -1;
|
||||
|
||||
fprintf(stderr, "test_gdi_SetROP2()\n");
|
||||
|
||||
if (test_gdi_SetROP2() < 0)
|
||||
return -1;
|
||||
|
||||
fprintf(stderr, "test_gdi_MoveToEx()\n");
|
||||
|
||||
if (test_gdi_MoveToEx() < 0)
|
||||
return -1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
127
libfreerdp/gdi/test/TestGdiEllipse.c
Normal file
127
libfreerdp/gdi/test/TestGdiEllipse.c
Normal file
@ -0,0 +1,127 @@
|
||||
|
||||
#include <freerdp/gdi/gdi.h>
|
||||
|
||||
#include <freerdp/gdi/dc.h>
|
||||
#include <freerdp/gdi/pen.h>
|
||||
#include <freerdp/gdi/line.h>
|
||||
#include <freerdp/gdi/shape.h>
|
||||
#include <freerdp/gdi/brush.h>
|
||||
#include <freerdp/gdi/region.h>
|
||||
#include <freerdp/gdi/bitmap.h>
|
||||
#include <freerdp/gdi/drawing.h>
|
||||
#include <freerdp/gdi/palette.h>
|
||||
#include <freerdp/gdi/clipping.h>
|
||||
|
||||
#include <winpr/crt.h>
|
||||
#include <winpr/print.h>
|
||||
|
||||
/* Ellipse() Test Data */
|
||||
|
||||
BYTE ellipse_case_1[256] =
|
||||
{
|
||||
"\xFF\xFF\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF\xFF\xFF"
|
||||
"\xFF\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF\xFF"
|
||||
"\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF"
|
||||
"\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF"
|
||||
"\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF"
|
||||
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
||||
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
||||
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
||||
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
||||
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
||||
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
||||
"\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF"
|
||||
"\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF"
|
||||
"\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF"
|
||||
"\xFF\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF\xFF"
|
||||
"\xFF\xFF\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF\xFF\xFF"
|
||||
};
|
||||
|
||||
BYTE ellipse_case_2[256] =
|
||||
{
|
||||
"\xFF\xFF\xFF\xFF\xFF\xFF\x00\x00\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF"
|
||||
"\xFF\xFF\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF\xFF\xFF"
|
||||
"\xFF\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF\xFF"
|
||||
"\xFF\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF\xFF"
|
||||
"\xFF\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF\xFF"
|
||||
"\xFF\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF\xFF"
|
||||
"\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF"
|
||||
"\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF"
|
||||
"\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF"
|
||||
"\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF"
|
||||
"\xFF\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF\xFF"
|
||||
"\xFF\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF\xFF"
|
||||
"\xFF\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF\xFF"
|
||||
"\xFF\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF\xFF"
|
||||
"\xFF\xFF\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF\xFF\xFF"
|
||||
"\xFF\xFF\xFF\xFF\xFF\xFF\x00\x00\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF"
|
||||
};
|
||||
|
||||
BYTE ellipse_case_3[256] =
|
||||
{
|
||||
"\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
|
||||
"\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
|
||||
"\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
|
||||
"\xFF\xFF\xFF\xFF\xFF\xFF\x00\x00\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF"
|
||||
"\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF"
|
||||
"\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF"
|
||||
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
||||
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
||||
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
||||
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
||||
"\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF"
|
||||
"\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF"
|
||||
"\xFF\xFF\xFF\xFF\xFF\xFF\x00\x00\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF"
|
||||
"\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
|
||||
"\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
|
||||
"\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
|
||||
};
|
||||
|
||||
int TestGdiEllipse(int argc, char* argv[])
|
||||
{
|
||||
HGDI_DC hdc;
|
||||
HGDI_PEN pen;
|
||||
BYTE* data;
|
||||
HGDI_BITMAP hBmp;
|
||||
HGDI_BITMAP hBmp_Ellipse_1;
|
||||
HGDI_BITMAP hBmp_Ellipse_2;
|
||||
HGDI_BITMAP hBmp_Ellipse_3;
|
||||
rdpPalette* hPalette;
|
||||
HCLRCONV clrconv;
|
||||
int bitsPerPixel = 8;
|
||||
int bytesPerPixel = 1;
|
||||
|
||||
hdc = gdi_GetDC();
|
||||
hdc->bitsPerPixel = bitsPerPixel;
|
||||
hdc->bytesPerPixel = bytesPerPixel;
|
||||
gdi_SetNullClipRgn(hdc);
|
||||
|
||||
pen = gdi_CreatePen(1, 1, 0);
|
||||
gdi_SelectObject(hdc, (HGDIOBJECT) pen);
|
||||
|
||||
hBmp = gdi_CreateCompatibleBitmap(hdc, 16, 16);
|
||||
gdi_SelectObject(hdc, (HGDIOBJECT) hBmp);
|
||||
|
||||
hPalette = (rdpPalette*) gdi_GetSystemPalette();
|
||||
|
||||
clrconv = (HCLRCONV) malloc(sizeof(CLRCONV));
|
||||
clrconv->alpha = 1;
|
||||
clrconv->invert = 0;
|
||||
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);
|
||||
|
||||
data = (BYTE*) freerdp_image_convert((BYTE*) ellipse_case_2, NULL, 16, 16, 8, bitsPerPixel, clrconv);
|
||||
hBmp_Ellipse_2 = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
|
||||
|
||||
data = (BYTE*) freerdp_image_convert((BYTE*) ellipse_case_3, NULL, 16, 16, 8, bitsPerPixel, clrconv);
|
||||
hBmp_Ellipse_3 = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
|
||||
|
||||
/* Test Case 1: (0,0) -> (16, 16) */
|
||||
gdi_BitBlt(hdc, 0, 0, 16, 16, hdc, 0, 0, GDI_WHITENESS);
|
||||
gdi_Ellipse(hdc, 0, 0, 16, 16);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
993
libfreerdp/gdi/test/TestGdiLine.c
Normal file
993
libfreerdp/gdi/test/TestGdiLine.c
Normal file
@ -0,0 +1,993 @@
|
||||
|
||||
#include <freerdp/gdi/gdi.h>
|
||||
|
||||
#include <freerdp/gdi/dc.h>
|
||||
#include <freerdp/gdi/pen.h>
|
||||
#include <freerdp/gdi/line.h>
|
||||
#include <freerdp/gdi/brush.h>
|
||||
#include <freerdp/gdi/region.h>
|
||||
#include <freerdp/gdi/bitmap.h>
|
||||
#include <freerdp/gdi/drawing.h>
|
||||
#include <freerdp/gdi/palette.h>
|
||||
#include <freerdp/gdi/clipping.h>
|
||||
|
||||
#include <winpr/crt.h>
|
||||
#include <winpr/print.h>
|
||||
|
||||
/* LineTo() Test Data */
|
||||
|
||||
BYTE line_to_case_1[256] =
|
||||
{
|
||||
"\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
|
||||
"\xFF\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
|
||||
"\xFF\xFF\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
|
||||
"\xFF\xFF\xFF\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
|
||||
"\xFF\xFF\xF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FF"
|
||||
"\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF"
|
||||
"\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
|
||||
"\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
|
||||
};
|
||||
|
||||
extern int test_assert_bitmaps_equal(HGDI_BITMAP hBmpActual, HGDI_BITMAP hBmpExpected, const char* name);
|
||||
|
||||
int TestGdiLine(int argc, char* argv[])
|
||||
{
|
||||
HGDI_DC hdc;
|
||||
HGDI_PEN pen;
|
||||
BYTE* data;
|
||||
HGDI_BITMAP hBmp;
|
||||
HGDI_BITMAP hBmp_LineTo_1;
|
||||
HGDI_BITMAP hBmp_LineTo_2;
|
||||
HGDI_BITMAP hBmp_LineTo_3;
|
||||
HGDI_BITMAP hBmp_LineTo_4;
|
||||
HGDI_BITMAP hBmp_LineTo_5;
|
||||
HGDI_BITMAP hBmp_LineTo_6;
|
||||
HGDI_BITMAP hBmp_LineTo_7;
|
||||
HGDI_BITMAP hBmp_LineTo_8;
|
||||
HGDI_BITMAP hBmp_LineTo_9;
|
||||
HGDI_BITMAP hBmp_LineTo_10;
|
||||
HGDI_BITMAP hBmp_LineTo_11;
|
||||
HGDI_BITMAP hBmp_LineTo_R2_BLACK;
|
||||
HGDI_BITMAP hBmp_LineTo_R2_NOTMERGEPEN;
|
||||
HGDI_BITMAP hBmp_LineTo_R2_MASKNOTPEN;
|
||||
HGDI_BITMAP hBmp_LineTo_R2_NOTCOPYPEN;
|
||||
HGDI_BITMAP hBmp_LineTo_R2_MASKPENNOT;
|
||||
HGDI_BITMAP hBmp_LineTo_R2_NOT;
|
||||
HGDI_BITMAP hBmp_LineTo_R2_XORPEN;
|
||||
HGDI_BITMAP hBmp_LineTo_R2_NOTMASKPEN;
|
||||
HGDI_BITMAP hBmp_LineTo_R2_MASKPEN;
|
||||
HGDI_BITMAP hBmp_LineTo_R2_NOTXORPEN;
|
||||
HGDI_BITMAP hBmp_LineTo_R2_NOP;
|
||||
HGDI_BITMAP hBmp_LineTo_R2_MERGENOTPEN;
|
||||
HGDI_BITMAP hBmp_LineTo_R2_COPYPEN;
|
||||
HGDI_BITMAP hBmp_LineTo_R2_MERGEPENNOT;
|
||||
HGDI_BITMAP hBmp_LineTo_R2_MERGEPEN;
|
||||
HGDI_BITMAP hBmp_LineTo_R2_WHITE;
|
||||
rdpPalette* hPalette;
|
||||
HCLRCONV clrconv;
|
||||
int bitsPerPixel = 8;
|
||||
int bytesPerPixel = 1;
|
||||
|
||||
hdc = gdi_GetDC();
|
||||
hdc->bitsPerPixel = bitsPerPixel;
|
||||
hdc->bytesPerPixel = bytesPerPixel;
|
||||
gdi_SetNullClipRgn(hdc);
|
||||
|
||||
pen = gdi_CreatePen(1, 1, 0);
|
||||
gdi_SelectObject(hdc, (HGDIOBJECT) pen);
|
||||
|
||||
hBmp = gdi_CreateCompatibleBitmap(hdc, 16, 16);
|
||||
gdi_SelectObject(hdc, (HGDIOBJECT) hBmp);
|
||||
|
||||
hPalette = (rdpPalette*) gdi_GetSystemPalette();
|
||||
|
||||
clrconv = (HCLRCONV) malloc(sizeof(CLRCONV));
|
||||
clrconv->alpha = 1;
|
||||
clrconv->invert = 0;
|
||||
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);
|
||||
|
||||
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);
|
||||
|
||||
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);
|
||||
|
||||
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);
|
||||
|
||||
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);
|
||||
|
||||
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);
|
||||
|
||||
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);
|
||||
|
||||
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);
|
||||
|
||||
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);
|
||||
|
||||
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);
|
||||
|
||||
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);
|
||||
|
||||
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);
|
||||
|
||||
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);
|
||||
|
||||
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);
|
||||
|
||||
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);
|
||||
|
||||
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);
|
||||
|
||||
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);
|
||||
|
||||
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);
|
||||
|
||||
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);
|
||||
|
||||
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);
|
||||
|
||||
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);
|
||||
|
||||
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);
|
||||
|
||||
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);
|
||||
|
||||
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);
|
||||
|
||||
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);
|
||||
|
||||
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);
|
||||
|
||||
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);
|
||||
|
||||
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);
|
||||
|
||||
/* Test Case 1: (0,0) -> (15, 15) */
|
||||
gdi_BitBlt(hdc, 0, 0, 16, 16, hdc, 0, 0, GDI_WHITENESS);
|
||||
gdi_MoveToEx(hdc, 0, 0, NULL);
|
||||
gdi_LineTo(hdc, 15, 15);
|
||||
|
||||
if (test_assert_bitmaps_equal(hBmp, hBmp_LineTo_1, "Case 1") < 0)
|
||||
return -1;
|
||||
|
||||
/* Test Case 2: (15,15) -> (0,0) */
|
||||
gdi_BitBlt(hdc, 0, 0, 16, 16, hdc, 0, 0, GDI_WHITENESS);
|
||||
gdi_MoveToEx(hdc, 15, 15, NULL);
|
||||
gdi_LineTo(hdc, 0, 0);
|
||||
|
||||
if (test_assert_bitmaps_equal(hBmp, hBmp_LineTo_2, "Case 2") < 0)
|
||||
return -1;
|
||||
|
||||
/* Test Case 3: (15,0) -> (0,15) */
|
||||
gdi_BitBlt(hdc, 0, 0, 16, 16, hdc, 0, 0, GDI_WHITENESS);
|
||||
gdi_MoveToEx(hdc, 15, 0, NULL);
|
||||
gdi_LineTo(hdc, 0, 15);
|
||||
|
||||
if (test_assert_bitmaps_equal(hBmp, hBmp_LineTo_3, "Case 3") < 0)
|
||||
return -1;
|
||||
|
||||
/* Test Case 4: (0,15) -> (15,0) */
|
||||
gdi_BitBlt(hdc, 0, 0, 16, 16, hdc, 0, 0, GDI_WHITENESS);
|
||||
gdi_MoveToEx(hdc, 0, 15, NULL);
|
||||
gdi_LineTo(hdc, 15, 0);
|
||||
|
||||
if (test_assert_bitmaps_equal(hBmp, hBmp_LineTo_4, "Case 4") < 0)
|
||||
return -1;
|
||||
|
||||
/* Test Case 5: (0,8) -> (15,8) */
|
||||
gdi_BitBlt(hdc, 0, 0, 16, 16, hdc, 0, 0, GDI_WHITENESS);
|
||||
gdi_MoveToEx(hdc, 0, 8, NULL);
|
||||
gdi_LineTo(hdc, 15, 8);
|
||||
|
||||
if (test_assert_bitmaps_equal(hBmp, hBmp_LineTo_5, "Case 5") < 0)
|
||||
return -1;
|
||||
|
||||
/* Test Case 6: (15,8) -> (0,8) */
|
||||
gdi_BitBlt(hdc, 0, 0, 16, 16, hdc, 0, 0, GDI_WHITENESS);
|
||||
gdi_MoveToEx(hdc, 15, 8, NULL);
|
||||
gdi_LineTo(hdc, 0, 8);
|
||||
|
||||
if (test_assert_bitmaps_equal(hBmp, hBmp_LineTo_6, "Case 6") < 0)
|
||||
return -1;
|
||||
|
||||
/* Test Case 7: (8,0) -> (8,15) */
|
||||
gdi_BitBlt(hdc, 0, 0, 16, 16, hdc, 0, 0, GDI_WHITENESS);
|
||||
gdi_MoveToEx(hdc, 8, 0, NULL);
|
||||
gdi_LineTo(hdc, 8, 15);
|
||||
|
||||
if (test_assert_bitmaps_equal(hBmp, hBmp_LineTo_7, "Case 7") < 0)
|
||||
return -1;
|
||||
|
||||
/* Test Case 8: (8,15) -> (8,0) */
|
||||
gdi_BitBlt(hdc, 0, 0, 16, 16, hdc, 0, 0, GDI_WHITENESS);
|
||||
gdi_MoveToEx(hdc, 8, 15, NULL);
|
||||
gdi_LineTo(hdc, 8, 0);
|
||||
|
||||
if (test_assert_bitmaps_equal(hBmp, hBmp_LineTo_8, "Case 8") < 0)
|
||||
return -1;
|
||||
|
||||
/* Test Case 9: (4,4) -> (12,12) */
|
||||
gdi_BitBlt(hdc, 0, 0, 16, 16, hdc, 0, 0, GDI_WHITENESS);
|
||||
gdi_MoveToEx(hdc, 4, 4, NULL);
|
||||
gdi_LineTo(hdc, 12, 12);
|
||||
|
||||
if (test_assert_bitmaps_equal(hBmp, hBmp_LineTo_9, "Case 9") < 0)
|
||||
return -1;
|
||||
|
||||
/* Test Case 10: (12,12) -> (4,4) */
|
||||
gdi_BitBlt(hdc, 0, 0, 16, 16, hdc, 0, 0, GDI_WHITENESS);
|
||||
gdi_MoveToEx(hdc, 12, 12, NULL);
|
||||
gdi_LineTo(hdc, 4, 4);
|
||||
|
||||
if (test_assert_bitmaps_equal(hBmp, hBmp_LineTo_10, "Case 10") < 0)
|
||||
return -1;
|
||||
|
||||
/* Test Case 11: (0,0) -> (+10,+10) */
|
||||
gdi_BitBlt(hdc, 0, 0, 16, 16, hdc, 0, 0, GDI_WHITENESS);
|
||||
gdi_SetClipRgn(hdc, 0, 0, 16, 16);
|
||||
gdi_MoveToEx(hdc, 0, 0, NULL);
|
||||
gdi_LineTo(hdc, 16 + 10, 16 + 10);
|
||||
|
||||
if (test_assert_bitmaps_equal(hBmp, hBmp_LineTo_11, "Case 11") < 0)
|
||||
return -1;
|
||||
|
||||
/* Test Case 12: (0,0) -> (16,16), R2_BLACK */
|
||||
gdi_BitBlt(hdc, 0, 0, 16, 16, hdc, 0, 0, GDI_WHITENESS);
|
||||
gdi_SetClipRgn(hdc, 0, 0, 16, 16);
|
||||
gdi_MoveToEx(hdc, 0, 0, NULL);
|
||||
gdi_SetROP2(hdc, GDI_R2_BLACK);
|
||||
gdi_LineTo(hdc, 16, 16);
|
||||
|
||||
if (test_assert_bitmaps_equal(hBmp, hBmp_LineTo_R2_BLACK, "Case 12") < 0)
|
||||
return -1;
|
||||
|
||||
/* Test Case 13: (0,0) -> (16,16), R2_NOTMERGEPEN */
|
||||
gdi_BitBlt(hdc, 0, 0, 16, 16, hdc, 0, 0, GDI_WHITENESS);
|
||||
gdi_SetClipRgn(hdc, 0, 0, 16, 16);
|
||||
gdi_MoveToEx(hdc, 0, 0, NULL);
|
||||
gdi_SetROP2(hdc, GDI_R2_NOTMERGEPEN);
|
||||
gdi_LineTo(hdc, 16, 16);
|
||||
|
||||
if (test_assert_bitmaps_equal(hBmp, hBmp_LineTo_R2_NOTMERGEPEN, "Case 13") < 0)
|
||||
return -1;
|
||||
|
||||
/* Test Case 14: (0,0) -> (16,16), R2_MASKNOTPEN */
|
||||
gdi_BitBlt(hdc, 0, 0, 16, 16, hdc, 0, 0, GDI_WHITENESS);
|
||||
gdi_SetClipRgn(hdc, 0, 0, 16, 16);
|
||||
gdi_MoveToEx(hdc, 0, 0, NULL);
|
||||
gdi_SetROP2(hdc, GDI_R2_MASKNOTPEN);
|
||||
gdi_LineTo(hdc, 16, 16);
|
||||
|
||||
if (test_assert_bitmaps_equal(hBmp, hBmp_LineTo_R2_MASKNOTPEN, "Case 14") < 0)
|
||||
return -1;
|
||||
|
||||
/* Test Case 15: (0,0) -> (16,16), R2_NOTCOPYPEN */
|
||||
gdi_BitBlt(hdc, 0, 0, 16, 16, hdc, 0, 0, GDI_WHITENESS);
|
||||
gdi_SetClipRgn(hdc, 0, 0, 16, 16);
|
||||
gdi_MoveToEx(hdc, 0, 0, NULL);
|
||||
gdi_SetROP2(hdc, GDI_R2_NOTCOPYPEN);
|
||||
gdi_LineTo(hdc, 16, 16);
|
||||
|
||||
if (test_assert_bitmaps_equal(hBmp, hBmp_LineTo_R2_NOTCOPYPEN, "Case 15") < 0)
|
||||
return -1;
|
||||
|
||||
/* Test Case 16: (0,0) -> (16,16), R2_MASKPENNOT */
|
||||
gdi_BitBlt(hdc, 0, 0, 16, 16, hdc, 0, 0, GDI_WHITENESS);
|
||||
gdi_SetClipRgn(hdc, 0, 0, 16, 16);
|
||||
gdi_MoveToEx(hdc, 0, 0, NULL);
|
||||
gdi_SetROP2(hdc, GDI_R2_MASKPENNOT);
|
||||
gdi_LineTo(hdc, 16, 16);
|
||||
|
||||
if (test_assert_bitmaps_equal(hBmp, hBmp_LineTo_R2_MASKPENNOT, "Case 16") < 0)
|
||||
return -1;
|
||||
|
||||
/* Test Case 17: (0,0) -> (16,16), R2_NOT */
|
||||
gdi_BitBlt(hdc, 0, 0, 16, 16, hdc, 0, 0, GDI_WHITENESS);
|
||||
gdi_SetClipRgn(hdc, 0, 0, 16, 16);
|
||||
gdi_MoveToEx(hdc, 0, 0, NULL);
|
||||
gdi_SetROP2(hdc, GDI_R2_NOT);
|
||||
gdi_LineTo(hdc, 16, 16);
|
||||
|
||||
if (test_assert_bitmaps_equal(hBmp, hBmp_LineTo_R2_NOT, "Case 17") < 0)
|
||||
return -1;
|
||||
|
||||
/* Test Case 18: (0,0) -> (16,16), R2_XORPEN */
|
||||
gdi_BitBlt(hdc, 0, 0, 16, 16, hdc, 0, 0, GDI_WHITENESS);
|
||||
gdi_SetClipRgn(hdc, 0, 0, 16, 16);
|
||||
gdi_MoveToEx(hdc, 0, 0, NULL);
|
||||
gdi_SetROP2(hdc, GDI_R2_XORPEN);
|
||||
gdi_LineTo(hdc, 16, 16);
|
||||
|
||||
if (test_assert_bitmaps_equal(hBmp, hBmp_LineTo_R2_XORPEN, "Case 18") < 0)
|
||||
return -1;
|
||||
|
||||
/* Test Case 19: (0,0) -> (16,16), R2_NOTMASKPEN */
|
||||
gdi_BitBlt(hdc, 0, 0, 16, 16, hdc, 0, 0, GDI_WHITENESS);
|
||||
gdi_SetClipRgn(hdc, 0, 0, 16, 16);
|
||||
gdi_MoveToEx(hdc, 0, 0, NULL);
|
||||
gdi_SetROP2(hdc, GDI_R2_NOTMASKPEN);
|
||||
gdi_LineTo(hdc, 16, 16);
|
||||
|
||||
if (test_assert_bitmaps_equal(hBmp, hBmp_LineTo_R2_NOTMASKPEN, "Case 19") < 0)
|
||||
return -1;
|
||||
|
||||
/* Test Case 20: (0,0) -> (16,16), R2_MASKPEN */
|
||||
gdi_BitBlt(hdc, 0, 0, 16, 16, hdc, 0, 0, GDI_WHITENESS);
|
||||
gdi_SetClipRgn(hdc, 0, 0, 16, 16);
|
||||
gdi_MoveToEx(hdc, 0, 0, NULL);
|
||||
gdi_SetROP2(hdc, GDI_R2_MASKPEN);
|
||||
gdi_LineTo(hdc, 16, 16);
|
||||
|
||||
if (test_assert_bitmaps_equal(hBmp, hBmp_LineTo_R2_MASKPEN, "Case 20") < 0)
|
||||
return -1;
|
||||
|
||||
/* Test Case 21: (0,0) -> (16,16), R2_NOTXORPEN */
|
||||
gdi_BitBlt(hdc, 0, 0, 16, 16, hdc, 0, 0, GDI_WHITENESS);
|
||||
gdi_SetClipRgn(hdc, 0, 0, 16, 16);
|
||||
gdi_MoveToEx(hdc, 0, 0, NULL);
|
||||
gdi_SetROP2(hdc, GDI_R2_NOTXORPEN);
|
||||
gdi_LineTo(hdc, 16, 16);
|
||||
|
||||
if (test_assert_bitmaps_equal(hBmp, hBmp_LineTo_R2_NOTXORPEN, "Case 21") < 0)
|
||||
return -1;
|
||||
|
||||
/* Test Case 22: (0,0) -> (16,16), R2_NOP */
|
||||
gdi_BitBlt(hdc, 0, 0, 16, 16, hdc, 0, 0, GDI_WHITENESS);
|
||||
gdi_SetClipRgn(hdc, 0, 0, 16, 16);
|
||||
gdi_MoveToEx(hdc, 0, 0, NULL);
|
||||
gdi_SetROP2(hdc, GDI_R2_NOP);
|
||||
gdi_LineTo(hdc, 16, 16);
|
||||
|
||||
if (test_assert_bitmaps_equal(hBmp, hBmp_LineTo_R2_NOP, "Case 22") < 0)
|
||||
return -1;
|
||||
|
||||
/* Test Case 23: (0,0) -> (16,16), R2_MERGENOTPEN */
|
||||
gdi_BitBlt(hdc, 0, 0, 16, 16, hdc, 0, 0, GDI_WHITENESS);
|
||||
gdi_SetClipRgn(hdc, 0, 0, 16, 16);
|
||||
gdi_MoveToEx(hdc, 0, 0, NULL);
|
||||
gdi_SetROP2(hdc, GDI_R2_MERGENOTPEN);
|
||||
gdi_LineTo(hdc, 16, 16);
|
||||
|
||||
if (test_assert_bitmaps_equal(hBmp, hBmp_LineTo_R2_MERGENOTPEN, "Case 23") < 0)
|
||||
return -1;
|
||||
|
||||
/* Test Case 24: (0,0) -> (16,16), R2_COPYPEN */
|
||||
gdi_BitBlt(hdc, 0, 0, 16, 16, hdc, 0, 0, GDI_WHITENESS);
|
||||
gdi_SetClipRgn(hdc, 0, 0, 16, 16);
|
||||
gdi_MoveToEx(hdc, 0, 0, NULL);
|
||||
gdi_SetROP2(hdc, GDI_R2_COPYPEN);
|
||||
gdi_LineTo(hdc, 16, 16);
|
||||
|
||||
if (test_assert_bitmaps_equal(hBmp, hBmp_LineTo_R2_COPYPEN, "Case 24") < 0)
|
||||
return -1;
|
||||
|
||||
/* Test Case 25: (0,0) -> (16,16), R2_MERGEPENNOT */
|
||||
gdi_BitBlt(hdc, 0, 0, 16, 16, hdc, 0, 0, GDI_WHITENESS);
|
||||
gdi_SetClipRgn(hdc, 0, 0, 16, 16);
|
||||
gdi_MoveToEx(hdc, 0, 0, NULL);
|
||||
gdi_SetROP2(hdc, GDI_R2_MERGEPENNOT);
|
||||
gdi_LineTo(hdc, 16, 16);
|
||||
|
||||
if (test_assert_bitmaps_equal(hBmp, hBmp_LineTo_R2_MERGEPENNOT, "Case 25") < 0)
|
||||
return -1;
|
||||
|
||||
/* Test Case 26: (0,0) -> (16,16), R2_MERGEPEN */
|
||||
gdi_BitBlt(hdc, 0, 0, 16, 16, hdc, 0, 0, GDI_WHITENESS);
|
||||
gdi_SetClipRgn(hdc, 0, 0, 16, 16);
|
||||
gdi_MoveToEx(hdc, 0, 0, NULL);
|
||||
gdi_SetROP2(hdc, GDI_R2_MERGEPEN);
|
||||
gdi_LineTo(hdc, 16, 16);
|
||||
|
||||
if (test_assert_bitmaps_equal(hBmp, hBmp_LineTo_R2_MERGEPEN, "Case 26") < 0)
|
||||
return -1;
|
||||
|
||||
/* Test Case 27: (0,0) -> (16,16), R2_WHITE */
|
||||
gdi_BitBlt(hdc, 0, 0, 16, 16, hdc, 0, 0, GDI_WHITENESS);
|
||||
gdi_SetClipRgn(hdc, 0, 0, 16, 16);
|
||||
gdi_MoveToEx(hdc, 0, 0, NULL);
|
||||
gdi_SetROP2(hdc, GDI_R2_WHITE);
|
||||
gdi_LineTo(hdc, 16, 16);
|
||||
|
||||
if (test_assert_bitmaps_equal(hBmp, hBmp_LineTo_R2_WHITE, "Case 27") < 0)
|
||||
return -1;
|
||||
|
||||
return 0;
|
||||
}
|
149
libfreerdp/gdi/test/TestGdiRect.c
Normal file
149
libfreerdp/gdi/test/TestGdiRect.c
Normal file
@ -0,0 +1,149 @@
|
||||
|
||||
#include <freerdp/gdi/gdi.h>
|
||||
|
||||
#include <freerdp/gdi/dc.h>
|
||||
#include <freerdp/gdi/pen.h>
|
||||
#include <freerdp/gdi/line.h>
|
||||
#include <freerdp/gdi/shape.h>
|
||||
#include <freerdp/gdi/brush.h>
|
||||
#include <freerdp/gdi/region.h>
|
||||
#include <freerdp/gdi/bitmap.h>
|
||||
#include <freerdp/gdi/drawing.h>
|
||||
#include <freerdp/gdi/palette.h>
|
||||
#include <freerdp/gdi/clipping.h>
|
||||
#include <freerdp/gdi/32bpp.h>
|
||||
|
||||
#include <winpr/crt.h>
|
||||
#include <winpr/print.h>
|
||||
|
||||
int test_gdi_PtInRect(void)
|
||||
{
|
||||
HGDI_RECT hRect;
|
||||
int left = 20;
|
||||
int top = 40;
|
||||
int right = 60;
|
||||
int bottom = 80;
|
||||
|
||||
hRect = gdi_CreateRect(left, top, right, bottom);
|
||||
|
||||
if (gdi_PtInRect(hRect, 0, 0) != 0)
|
||||
return -1;
|
||||
|
||||
if (gdi_PtInRect(hRect, 500, 500) != 0)
|
||||
return -1;
|
||||
|
||||
if (gdi_PtInRect(hRect, 40, 100) != 0)
|
||||
return -1;
|
||||
|
||||
if (gdi_PtInRect(hRect, 10, 40) != 0)
|
||||
return -1;
|
||||
|
||||
if (gdi_PtInRect(hRect, 30, 50) != 1)
|
||||
return -1;
|
||||
|
||||
if (gdi_PtInRect(hRect, left, top) != 1)
|
||||
return -1;
|
||||
|
||||
if (gdi_PtInRect(hRect, right, bottom) != 1)
|
||||
return -1;
|
||||
|
||||
if (gdi_PtInRect(hRect, right, 60) != 1)
|
||||
return -1;
|
||||
|
||||
if (gdi_PtInRect(hRect, 40, bottom) != 1)
|
||||
return -1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int test_gdi_FillRect(void)
|
||||
{
|
||||
HGDI_DC hdc;
|
||||
HGDI_RECT hRect;
|
||||
HGDI_BRUSH hBrush;
|
||||
HGDI_BITMAP hBitmap;
|
||||
GDI_COLOR color;
|
||||
GDI_COLOR pixel;
|
||||
GDI_COLOR rawPixel;
|
||||
|
||||
int x, y;
|
||||
int badPixels;
|
||||
int goodPixels;
|
||||
int width = 200;
|
||||
int height = 300;
|
||||
|
||||
int left = 20;
|
||||
int top = 40;
|
||||
int right = 60;
|
||||
int bottom = 80;
|
||||
|
||||
hdc = gdi_GetDC();
|
||||
hdc->bytesPerPixel = 4;
|
||||
hdc->bitsPerPixel = 32;
|
||||
|
||||
hRect = gdi_CreateRect(left, top, right, bottom);
|
||||
|
||||
hBitmap = gdi_CreateCompatibleBitmap(hdc, width, height);
|
||||
ZeroMemory(hBitmap->data, width * height * hdc->bytesPerPixel);
|
||||
gdi_SelectObject(hdc, (HGDIOBJECT) hBitmap);
|
||||
|
||||
color = (GDI_COLOR) ARGB32(0xFF, 0xAA, 0xBB, 0xCC);
|
||||
hBrush = gdi_CreateSolidBrush(color);
|
||||
|
||||
gdi_FillRect(hdc, hRect, hBrush);
|
||||
|
||||
badPixels = 0;
|
||||
goodPixels = 0;
|
||||
|
||||
for (x = 0; x < width; x++)
|
||||
{
|
||||
for (y = 0; y < height; y++)
|
||||
{
|
||||
rawPixel = gdi_GetPixel(hdc, x, y);
|
||||
pixel = gdi_get_color_32bpp(hdc, rawPixel);
|
||||
|
||||
if (gdi_PtInRect(hRect, x, y))
|
||||
{
|
||||
if (pixel == color) {
|
||||
goodPixels++;
|
||||
}
|
||||
else {
|
||||
printf("actual:%04X expected:%04X\n", gdi_GetPixel(hdc, x, y), color);
|
||||
badPixels++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (pixel == color) {
|
||||
badPixels++;
|
||||
}
|
||||
else {
|
||||
goodPixels++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (goodPixels != width * height)
|
||||
return -1;
|
||||
|
||||
if (badPixels != 0)
|
||||
return -1;
|
||||
|
||||
gdi_DeleteObject((HGDIOBJECT) hBrush);
|
||||
gdi_DeleteObject((HGDIOBJECT) hBitmap);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int TestGdiRect(int argc, char* argv[])
|
||||
{
|
||||
if (test_gdi_PtInRect() < 0)
|
||||
return -1;
|
||||
|
||||
if (test_gdi_FillRect() < 0)
|
||||
return -1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user