Module: wine Branch: master Commit: 6a8a770c76fb530b98dd18064f9dd40f9e159218 URL: http://source.winehq.org/git/wine.git/?a=commit;h=6a8a770c76fb530b98dd18064f...
Author: Vincent Povirk madewokherd@gmail.com Date: Sat Jul 11 10:57:07 2009 -0500
gdiplus: Use brush_fill_path in GdipFillRegion.
---
dlls/gdiplus/graphics.c | 13 +++++++++++-- 1 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c index 2912416..595fc24 100644 --- a/dlls/gdiplus/graphics.c +++ b/dlls/gdiplus/graphics.c @@ -2855,6 +2855,7 @@ GpStatus WINGDIPAPI GdipFillRegion(GpGraphics* graphics, GpBrush* brush, INT save_state; GpStatus status; HRGN hrgn; + RECT rc;
TRACE("(%p, %p, %p)\n", graphics, brush, region);
@@ -2870,9 +2871,17 @@ GpStatus WINGDIPAPI GdipFillRegion(GpGraphics* graphics, GpBrush* brush,
save_state = SaveDC(graphics->hdc); EndPath(graphics->hdc); - SelectObject(graphics->hdc, GetStockObject(NULL_PEN));
- FillRgn(graphics->hdc, hrgn, brush->gdibrush); + ExtSelectClipRgn(graphics->hdc, hrgn, RGN_AND); + + if (GetClipBox(graphics->hdc, &rc) != NULLREGION) + { + BeginPath(graphics->hdc); + Rectangle(graphics->hdc, rc.left, rc.top, rc.right, rc.bottom); + EndPath(graphics->hdc); + + brush_fill_path(graphics, brush); + }
RestoreDC(graphics->hdc, save_state);