gdiplus: use brush_fill_path in GdipFillRegion
Vincent Povirk
madewokherd+8cd9 at gmail.com
Sat Jul 11 11:04:31 CDT 2009
--
Vincent Povirk
-------------- next part --------------
From 247aafdb1d0c1553f1004613b11b677192152c12 Mon Sep 17 00:00:00 2001
From: Vincent Povirk <madewokherd at gmail.com>
Date: Sat, 11 Jul 2009 10:57:07 -0500
Subject: [PATCH 6/6] 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 12a92c9..58ca2e6 100644
--- a/dlls/gdiplus/graphics.c
+++ b/dlls/gdiplus/graphics.c
@@ -2857,6 +2857,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);
@@ -2872,9 +2873,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);
--
1.6.3.3
More information about the wine-patches
mailing list