Commit 88b9ae1e authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

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

parent 47b89a8f
......@@ -157,14 +157,18 @@ INT EMFDRV_SetArcDirection(PHYSDEV dev, INT arcDirection)
INT EMFDRV_ExcludeClipRect( PHYSDEV dev, INT left, INT top, INT right, INT bottom )
{
PHYSDEV next = GET_NEXT_PHYSDEV( dev, pExcludeClipRect );
EMREXCLUDECLIPRECT emr;
BOOL ret;
emr.emr.iType = EMR_EXCLUDECLIPRECT;
emr.emr.nSize = sizeof(emr);
emr.rclClip.left = left;
emr.rclClip.top = top;
emr.rclClip.right = right;
emr.rclClip.bottom = bottom;
return EMFDRV_WriteRecord( dev, &emr.emr );
ret = EMFDRV_WriteRecord( dev, &emr.emr );
return ret ? next->funcs->pExcludeClipRect( next, left, top, right, bottom ) : ERROR;
}
INT EMFDRV_IntersectClipRect( PHYSDEV dev, INT left, INT top, INT right, INT bottom)
......
......@@ -2530,7 +2530,6 @@ static void test_emf_clipping(void)
SetRect(&rc_sclip, 0, 0, 100, 50);
ret = ExcludeClipRect(hdc, 0, 50, 100, 100);
todo_wine
ok(ret == SIMPLEREGION || broken(ret == COMPLEXREGION) /* XP */, "got %d\n", ret);
if (ret == COMPLEXREGION)
{
......@@ -2543,10 +2542,9 @@ todo_wine
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.left, rc.top, rc.right, rc.bottom,
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);
......
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