Evan Stade : gdiplus: Added more GdipGetPathWorldBounds tests.
Alexandre Julliard
julliard at wine.codeweavers.com
Fri Jul 13 08:30:15 CDT 2007
Module: wine
Branch: master
Commit: 41a9a838909d94e9e095748a3fb8437bfe495544
URL: http://source.winehq.org/git/wine.git/?a=commit;h=41a9a838909d94e9e095748a3fb8437bfe495544
Author: Evan Stade <estade at gmail.com>
Date: Thu Jul 12 19:42:59 2007 -0700
gdiplus: Added more GdipGetPathWorldBounds tests.
---
dlls/gdiplus/tests/graphicspath.c | 77 +++++++++++++++++++++++++++++++++++++
1 files changed, 77 insertions(+), 0 deletions(-)
diff --git a/dlls/gdiplus/tests/graphicspath.c b/dlls/gdiplus/tests/graphicspath.c
index 63c0bdc..22aa882 100644
--- a/dlls/gdiplus/tests/graphicspath.c
+++ b/dlls/gdiplus/tests/graphicspath.c
@@ -308,6 +308,83 @@ static void test_worldbounds(void)
expectf(100.0, bounds.Y);
expectf(650.0, bounds.Width);
expectf(800.0, bounds.Height);
+
+ GdipCreatePath(FillModeAlternate, &path);
+ GdipAddPathLine2(path, &(line2_points[0]), 2);
+ status = GdipGetPathWorldBounds(path, &bounds, NULL, pen);
+ expect(Ok, status);
+ GdipDeletePath(path);
+
+ todo_wine{
+ expectf(156.0, bounds.X);
+ expectf(156.0, bounds.Y);
+ expectf(138.0, bounds.Width);
+ expectf(88.0, bounds.Height);
+ }
+
+ line2_points[2].X = 2 * line2_points[1].X - line2_points[0].X;
+ line2_points[2].Y = 2 * line2_points[1].Y - line2_points[0].Y;
+
+ GdipCreatePath(FillModeAlternate, &path);
+ GdipAddPathLine2(path, &(line2_points[0]), 3);
+ status = GdipGetPathWorldBounds(path, &bounds, NULL, pen);
+ expect(Ok, status);
+ GdipDeletePath(path);
+
+ expectf(100.0, bounds.X);
+ expectf(100.0, bounds.Y);
+ expectf(300.0, bounds.Width);
+ expectf(200.0, bounds.Height);
+
+ GdipCreatePath(FillModeAlternate, &path);
+ GdipAddPathArc(path, 100.0, 100.0, 500.0, 700.0, 45.0, 20.0);
+ status = GdipGetPathWorldBounds(path, &bounds, NULL, pen);
+ expect(Ok, status);
+ GdipDeletePath(path);
+
+ expectf(386.7, bounds.X);
+ expectf(553.4, bounds.Y);
+ expectf(266.8, bounds.Width);
+ expectf(289.6, bounds.Height);
+
+ GdipCreatePath(FillModeAlternate, &path);
+ status = GdipGetPathWorldBounds(path, &bounds, matrix, pen);
+ expect(Ok, status);
+ GdipDeletePath(path);
+
+ expectf(0.0, bounds.X);
+ expectf(0.0, bounds.Y);
+ expectf(0.0, bounds.Width);
+ expectf(0.0, bounds.Height);
+
+ GdipCreatePath(FillModeAlternate, &path);
+ GdipAddPathLine2(path, &(line2_points[0]), 2);
+ status = GdipGetPathWorldBounds(path, &bounds, matrix, pen);
+ expect(Ok, status);
+ GdipDeletePath(path);
+
+ todo_wine{
+ expectf(427.9, bounds.X);
+ expectf(167.7, bounds.Y);
+ expectf(239.9, bounds.Width);
+ expectf(164.9, bounds.Height);
+ }
+
+ GdipDeleteMatrix(matrix);
+ GdipCreateMatrix2(0.9, -0.5, -0.5, -1.2, 10.4, 10.2, &matrix);
+ GdipCreatePath(FillModeAlternate, &path);
+ GdipAddPathArc(path, 100.0, 100.0, 500.0, 700.0, 0.0, 100.0);
+ GdipAddPathLine2(path, &(line2_points[0]), 10);
+ status = GdipGetPathWorldBounds(path, &bounds, matrix, NULL);
+ expect(Ok, status);
+ GdipDeletePath(path);
+
+ todo_wine{
+ expectf(-209.6, bounds.X);
+ expectf(-1274.8, bounds.Y);
+ expectf(705.0, bounds.Width);
+ expectf(945.0, bounds.Height);
+ }
}
START_TEST(graphicspath)
More information about the wine-cvs
mailing list