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

This commit is contained in:
Dmitry Timoshkov 2013-02-14 13:37:38 +08:00 committed by Alexandre Julliard
parent 498b18f25f
commit 756736ae42
2 changed files with 5 additions and 3 deletions

View File

@ -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 )

View File

@ -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,