gdiplus: Add clipping to GDI32_GdipFillRegion.

Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Vincent Povirk 2016-09-19 15:07:00 -05:00 committed by Alexandre Julliard
parent 5a9f7ef06d
commit 3fd47e1be1
1 changed files with 17 additions and 1 deletions

View File

@ -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;
}