Commit 9a2688e6 authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

gdi32: Make sure that actual clipping region is updated for a EMF DC.

parent 0130eca6
......@@ -191,6 +191,7 @@ INT EMFDRV_OffsetClipRgn( PHYSDEV dev, INT x, INT y )
INT EMFDRV_ExtSelectClipRgn( PHYSDEV dev, HRGN hrgn, INT mode )
{
PHYSDEV next = GET_NEXT_PHYSDEV( dev, pExtSelectClipRgn );
EMREXTSELECTCLIPRGN *emr;
DWORD size, rgnsize;
BOOL ret;
......@@ -213,7 +214,7 @@ INT EMFDRV_ExtSelectClipRgn( PHYSDEV dev, HRGN hrgn, INT mode )
ret = EMFDRV_WriteRecord( dev, &emr->emr );
HeapFree( GetProcessHeap(), 0, emr );
return ret ? SIMPLEREGION : ERROR;
return ret ? next->funcs->pExtSelectClipRgn( next, hrgn, mode ) : ERROR;
}
INT EMFDRV_SetMapMode( PHYSDEV dev, INT mode )
......
......@@ -2477,14 +2477,13 @@ static void test_emf_clipping(void)
SetRect(&rc_sclip, 100, 100, GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN));
hrgn = CreateRectRgn(rc_sclip.left, rc_sclip.top, rc_sclip.right, rc_sclip.bottom);
SelectClipRgn(hdc, hrgn);
SetRect(&rc_res, -1, -1, -1, -1);
ret = GetClipBox(hdc, &rc_res);
todo_wine
ok(ret == SIMPLEREGION, "got %d\n", ret);
if(ret == SIMPLEREGION)
ok(EqualRect(&rc_res, &rc_sclip),
"expected rc_res (%d, %d) - (%d, %d), got (%d, %d) - (%d, %d)\n",
rc_sclip.left, rc_sclip.top, rc_sclip.right, rc_sclip.bottom,
rc_res.left, rc_res.top, rc_res.right, rc_res.bottom);
ok(EqualRect(&rc_res, &rc_sclip),
"expected rc_res (%d,%d)-(%d,%d), got (%d,%d)-(%d,%d)\n",
rc_sclip.left, rc_sclip.top, rc_sclip.right, rc_sclip.bottom,
rc_res.left, rc_res.top, rc_res.right, rc_res.bottom);
hemf = CloseEnhMetaFile(hdc);
DeleteEnhMetaFile(hemf);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment