Module: wine Branch: master Commit: 6b474b555eb1affba22d436d61d02fbc2f8c9169 URL: http://source.winehq.org/git/wine.git/?a=commit;h=6b474b555eb1affba22d436d61...
Author: Dmitry Timoshkov dmitry@baikal.ru Date: Tue Feb 19 11:45:50 2013 +0800
gdiplus: Reimplement GdipFillRectangles using GdipFillPath.
---
dlls/gdiplus/graphics.c | 17 ++++++++++------- 1 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c index ffb36bb..01e127c 100644 --- a/dlls/gdiplus/graphics.c +++ b/dlls/gdiplus/graphics.c @@ -3829,20 +3829,23 @@ GpStatus WINGDIPAPI GdipFillRectangleI(GpGraphics *graphics, GpBrush *brush, GpStatus WINGDIPAPI GdipFillRectangles(GpGraphics *graphics, GpBrush *brush, GDIPCONST GpRectF *rects, INT count) { - GpStatus ret; - INT i; + GpStatus status; + GpPath *path;
TRACE("(%p, %p, %p, %d)\n", graphics, brush, rects, count);
if(!rects) return InvalidParameter;
- for(i = 0; i < count; i++){ - ret = GdipFillRectangle(graphics, brush, rects[i].X, rects[i].Y, rects[i].Width, rects[i].Height); - if(ret != Ok) return ret; - } + status = GdipCreatePath(FillModeAlternate, &path); + if (status != Ok) return status;
- return Ok; + status = GdipAddPathRectangles(path, rects, count); + if (status == Ok) + status = GdipFillPath(graphics, brush, path); + + GdipDeletePath(path); + return status; }
GpStatus WINGDIPAPI GdipFillRectanglesI(GpGraphics *graphics, GpBrush *brush, GDIPCONST GpRect *rects,