[1/3] gdiplus: Add clipping to GDI32_GdipFillRegion.
Vincent Povirk
madewokherd at gmail.com
Mon Sep 19 15:07:00 CDT 2016
From: Vincent Povirk <vincent at codeweavers.com>
Signed-off-by: Vincent Povirk <vincent at codeweavers.com>
---
dlls/gdiplus/graphics.c | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c
index 4ae1f48..964fa9f 100644
--- a/dlls/gdiplus/graphics.c
+++ b/dlls/gdiplus/graphics.c
@@ -3942,6 +3942,23 @@ static GpStatus GDI32_GdipFillRegion(GpGraphics* graphics, GpBrush* brush,
ExtSelectClipRgn(graphics->hdc, hrgn, RGN_AND);
+ DeleteObject(hrgn);
+
+ hrgn = NULL;
+ status = get_clip_hrgn(graphics, &hrgn);
+
+ if (status != Ok)
+ {
+ RestoreDC(graphics->hdc, save_state);
+ return status;
+ }
+
+ if (hrgn)
+ {
+ ExtSelectClipRgn(graphics->hdc, hrgn, RGN_AND);
+ DeleteObject(hrgn);
+ }
+
if (GetClipBox(graphics->hdc, &rc) != NULLREGION)
{
BeginPath(graphics->hdc);
@@ -3953,7 +3970,6 @@ static GpStatus GDI32_GdipFillRegion(GpGraphics* graphics, GpBrush* brush,
RestoreDC(graphics->hdc, save_state);
- DeleteObject(hrgn);
return Ok;
}
--
2.7.4
More information about the wine-patches
mailing list