[1/2] gdiplus/tests: Add tests for 0-pixel pens.
Vincent Povirk
madewokherd at gmail.com
Wed Mar 9 15:52:49 CST 2016
From: Vincent Povirk <vincent at codeweavers.com>
Signed-off-by: Vincent Povirk <vincent at codeweavers.com>
---
dlls/gdiplus/tests/graphics.c | 1 +
dlls/gdiplus/tests/graphicspath.c | 18 ++++++++++++++++++
2 files changed, 19 insertions(+)
diff --git a/dlls/gdiplus/tests/graphics.c b/dlls/gdiplus/tests/graphics.c
index 3ee3363..8ca2281 100644
--- a/dlls/gdiplus/tests/graphics.c
+++ b/dlls/gdiplus/tests/graphics.c
@@ -3824,6 +3824,7 @@ static void test_pen_thickness(void)
} td[] =
{
{ 10.0, 10.0, 1.0, UnitPixel, UnitPixel, 1.0, 1, 1 },
+ { 10.0, 10.0, 1.0, UnitPixel, UnitPixel, 0.0, 1, 1 },
{ 10.0, 10.0, 3.0, UnitPixel, UnitPixel, 2.0, 2, 2 },
{ 10.0, 10.0, 30.0, UnitPixel, UnitInch, 1.0, 1, 1 },
{ 10.0, 10.0, 1.0, UnitWorld, UnitPixel, 1.0, 1, 1 },
diff --git a/dlls/gdiplus/tests/graphicspath.c b/dlls/gdiplus/tests/graphicspath.c
index 24619e5..085bad4 100644
--- a/dlls/gdiplus/tests/graphicspath.c
+++ b/dlls/gdiplus/tests/graphicspath.c
@@ -1068,6 +1068,7 @@ static void test_widen(void)
GpPath *path;
GpPen *pen;
GpMatrix *m;
+ INT count=-1;
status = GdipCreatePath(FillModeAlternate, &path);
expect(Ok, status);
@@ -1192,6 +1193,23 @@ static void test_widen(void)
expect(Ok, status);
ok_path(path, widenline_path, sizeof(widenline_path)/sizeof(path_test_t), FALSE);
+ /* pen width = 0 pixels - native fails to widen but can draw with this pen */
+ GdipDeletePen(pen);
+ status = GdipCreatePen1(0xffffffff, 0.0, UnitPixel, &pen);
+ expect(Ok, status);
+
+ status = GdipResetPath(path);
+ expect(Ok, status);
+ status = GdipAddPathLine(path, 5.0, 10.0, 50.0, 10.0);
+ expect(Ok, status);
+
+ status = GdipWidenPath(path, pen, m, 1.0);
+ expect(Ok, status);
+
+ status = GdipGetPointCount(path, &count);
+ expect(Ok, status);
+ todo_wine expect(0, count);
+
GdipDeleteMatrix(m);
GdipDeletePen(pen);
GdipDeletePath(path);
--
2.5.0
More information about the wine-patches
mailing list