[2/3] gdi32: test for PolyDraw with open path
Evan Stade
estade at gmail.com
Tue Jun 26 19:58:53 CDT 2007
Hi,
Changelog:
* added a test for PolyDraw with an open path. Currently todo_wine'ed.
dlls/gdi32/tests/path.c | 60 +++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 60 insertions(+), 0 deletions(-)
--
Evan Stade
-------------- next part --------------
diff --git a/dlls/gdi32/tests/path.c b/dlls/gdi32/tests/path.c
index e9b8e2f..4453b43 100644
--- a/dlls/gdi32/tests/path.c
+++ b/dlls/gdi32/tests/path.c
@@ -291,9 +291,69 @@ done:
ReleaseDC(0, hdc);
}
+static const path_test_t polydraw_path[] = {
+ {300, 300, 6, 0, 0}, /*0*/
+ {300, 300, 2, 0, 0}, /*1*/
+ {400, 300, 2, 0, 0}, /*2*/
+ {400, 350, 2, 0, 0}, /*3*/
+ {50, 100, 3, 0, 0}, /*4*/
+ {300, 300, 6, 0, 0}, /*5*/
+ {100, 50, 2, 0, 0}, /*6*/
+ {400, 250, 2, 0, 0}, /*7*/
+ {500, 300, 2, 0, 0}, /*8*/
+ {500, 350, 3, 0, 0} /*9*/
+ };
+
+
+static void test_polydraw(void)
+{
+ POINT pt[3], pt2[2];
+ BYTE tp[2];
+
+ HDC hdc = GetDC(0);
+ BeginPath(hdc);
+
+ MoveToEx(hdc, 300, 300, NULL);
+
+ pt[0].x = 300;
+ pt[0].y = 300;
+ pt[1].x = 400;
+ pt[1].y = 300;
+ pt[2].x = 400;
+ pt[2].y = 350;
+ PolylineTo(hdc, pt, 3);
+
+ pt2[0].x = 50;
+ pt2[0].y = 100;
+ pt2[1].x = 100;
+ pt2[1].y = 50;
+ tp[0] = PT_CLOSEFIGURE | PT_LINETO;
+ tp[1] = PT_LINETO;
+ if (!PolyDraw(hdc, pt2, tp, 2) &&
+ GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)
+ {
+ /* PolyDraw is only available on Win2k and later */
+ skip("PolyDraw is not available\n");
+ goto done;
+ }
+
+ pt[0].x += 100;
+ pt[0].y -= 50;
+ pt[1].x += 100;
+ pt[2].x += 100;
+ PolylineTo(hdc, pt, 3);
+ CloseFigure(hdc);
+ EndPath(hdc);
+
+ ok_path(hdc, "polydraw_path", polydraw_path, sizeof(polydraw_path)/sizeof(path_test_t), 1);
+done:
+ ReleaseDC(0, hdc);
+}
+
START_TEST(path)
{
test_widenpath();
test_arcto();
test_anglearc();
+ test_polydraw();
}
--
1.4.1
More information about the wine-patches
mailing list