From: Bartosz Kosiorek gang65@poczta.onet.pl
--- dlls/gdiplus/graphicspath.c | 7 ++++++- dlls/gdiplus/tests/graphicspath.c | 8 ++++---- 2 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/dlls/gdiplus/graphicspath.c b/dlls/gdiplus/graphicspath.c index cbf8e74340b..0b2af580349 100644 --- a/dlls/gdiplus/graphicspath.c +++ b/dlls/gdiplus/graphicspath.c @@ -1624,8 +1624,13 @@ GpStatus WINGDIPAPI GdipGetPathWorldBounds(GpPath* path, GpRectF* bounds,
/* If path is empty just return. */ count = path->pathdata.Count; - if(count == 0){ + if(count < 2){ bounds->X = bounds->Y = bounds->Width = bounds->Height = 0.0; + if(matrix && (count == 1)) + { + bounds->X = matrix->matrix[4]; + bounds->Y = matrix->matrix[5]; + } return Ok; }
diff --git a/dlls/gdiplus/tests/graphicspath.c b/dlls/gdiplus/tests/graphicspath.c index f300ced8672..4d3265e3a57 100644 --- a/dlls/gdiplus/tests/graphicspath.c +++ b/dlls/gdiplus/tests/graphicspath.c @@ -604,10 +604,10 @@ static void test_worldbounds(void) expect(Ok, status); GdipDeletePath(path);
- todo_wine expectf(10.40, bounds.X); - todo_wine expectf(10.20, bounds.Y); - todo_wine expectf(0.0, bounds.Width); - todo_wine expectf(0.0, bounds.Height); + expectf(10.40, bounds.X); + expectf(10.20, bounds.Y); + expectf(0.0, bounds.Width); + expectf(0.0, bounds.Height);
GdipCreatePath(FillModeAlternate, &path); GdipAddPathLine2(path, &(line2_points[0]), 2);