[1/3] gdiplus: Use clip region in GdipDrawPath.
Vincent Povirk
madewokherd at gmail.com
Wed Oct 30 12:50:49 CDT 2013
-------------- next part --------------
From 8ef6c29c87ac223275ece745ef4c1cf6405d9ee2 Mon Sep 17 00:00:00 2001
From: Vincent Povirk <vincent at codeweavers.com>
Date: Wed, 30 Oct 2013 11:13:46 -0500
Subject: [PATCH 1/3] gdiplus: Use clip region in GdipDrawPath.
---
dlls/gdiplus/graphics.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c
index 1b9d0e9..ad5e2be 100644
--- a/dlls/gdiplus/graphics.c
+++ b/dlls/gdiplus/graphics.c
@@ -3342,6 +3342,7 @@ GpStatus WINGDIPAPI GdipDrawPath(GpGraphics *graphics, GpPen *pen, GpPath *path)
{
INT save_state;
GpStatus retval;
+ HRGN hrgn=NULL;
TRACE("(%p, %p, %p)\n", graphics, pen, path);
@@ -3359,10 +3360,20 @@ GpStatus WINGDIPAPI GdipDrawPath(GpGraphics *graphics, GpPen *pen, GpPath *path)
save_state = prepare_dc(graphics, pen);
+ retval = get_clip_hrgn(graphics, &hrgn);
+
+ if (retval != Ok)
+ goto end;
+
+ if (hrgn)
+ ExtSelectClipRgn(graphics->hdc, hrgn, RGN_AND);
+
retval = draw_poly(graphics, pen, path->pathdata.Points,
path->pathdata.Types, path->pathdata.Count, TRUE);
+end:
restore_dc(graphics, save_state);
+ DeleteObject(hrgn);
return retval;
}
--
1.8.1.2
More information about the wine-patches
mailing list