Commit 756736ae authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

gdi32: OffsetClipRgn should update actual clipping region for a EMF DC.

parent 498b18f2
......@@ -181,12 +181,16 @@ INT EMFDRV_IntersectClipRect( PHYSDEV dev, INT left, INT top, INT right, INT bot
INT EMFDRV_OffsetClipRgn( PHYSDEV dev, INT x, INT y )
{
PHYSDEV next = GET_NEXT_PHYSDEV( dev, pOffsetClipRgn );
EMROFFSETCLIPRGN emr;
BOOL ret;
emr.emr.iType = EMR_OFFSETCLIPRGN;
emr.emr.nSize = sizeof(emr);
emr.ptlOffset.x = x;
emr.ptlOffset.y = y;
return EMFDRV_WriteRecord( dev, &emr.emr );
ret = EMFDRV_WriteRecord( dev, &emr.emr );
return ret ? next->funcs->pOffsetClipRgn( next, x, y ) : ERROR;
}
INT EMFDRV_ExtSelectClipRgn( PHYSDEV dev, HRGN hrgn, INT mode )
......
......@@ -2501,12 +2501,10 @@ static void test_emf_clipping(void)
OffsetRect(&rc_sclip, -100, -100);
ret = OffsetClipRgn(hdc, -100, -100);
todo_wine
ok(ret == SIMPLEREGION, "got %d\n", ret);
SetRect(&rc_res, -1, -1, -1, -1);
ret = GetClipBox(hdc, &rc_res);
ok(ret == SIMPLEREGION, "got %d\n", ret);
todo_wine
ok(EqualRect(&rc_res, &rc_sclip),
"expected (%d,%d)-(%d,%d), got (%d,%d)-(%d,%d)\n",
rc_sclip.left, rc_sclip.top, rc_sclip.right, rc_sclip.bottom,
......
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