[Wine-patches] [eter-2.1 3/4] gdi32: IntersectClipRect should update actual clipping region for a EMF DC. (eterbug #8867)
Dmitry Timoshkov
dtimoshkov на etersoft.ru
Пт Фев 15 08:14:55 MSK 2013
(cherry picked from commit 47b89a8fac21d6998541de8fe1fa45ed0028f2bc)
---
dlls/gdi32/enhmfdrv/dc.c | 6 +++++-
dlls/gdi32/tests/metafile.c | 2 --
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/dlls/gdi32/enhmfdrv/dc.c b/dlls/gdi32/enhmfdrv/dc.c
index f4c4a43..8a06ad4 100644
--- a/dlls/gdi32/enhmfdrv/dc.c
+++ b/dlls/gdi32/enhmfdrv/dc.c
@@ -169,14 +169,18 @@ INT EMFDRV_ExcludeClipRect( PHYSDEV dev, INT left, INT top, INT right, INT botto
INT EMFDRV_IntersectClipRect( PHYSDEV dev, INT left, INT top, INT right, INT bottom)
{
+ PHYSDEV next = GET_NEXT_PHYSDEV( dev, pIntersectClipRect );
EMRINTERSECTCLIPRECT emr;
+ BOOL ret;
+
emr.emr.iType = EMR_INTERSECTCLIPRECT;
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->pIntersectClipRect( next, left, top, right, bottom ) : ERROR;
}
INT EMFDRV_OffsetClipRgn( PHYSDEV dev, INT x, INT y )
diff --git a/dlls/gdi32/tests/metafile.c b/dlls/gdi32/tests/metafile.c
index e969c47..86fa373 100644
--- a/dlls/gdi32/tests/metafile.c
+++ b/dlls/gdi32/tests/metafile.c
@@ -2511,7 +2511,6 @@ static void test_emf_clipping(void)
rc_res.left, rc_res.top, rc_res.right, rc_res.bottom);
ret = IntersectClipRect(hdc, 0, 0, 100, 100);
-todo_wine
ok(ret == SIMPLEREGION || broken(ret == COMPLEXREGION) /* XP */, "got %d\n", ret);
if (ret == COMPLEXREGION)
{
@@ -2524,7 +2523,6 @@ 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),
"expected (%d,%d)-(%d,%d), got (%d,%d)-(%d,%d)\n",
rc.left, rc.top, rc.right, rc.bottom,
--
1.8.1.3
Подробная информация о списке рассылки Wine-patches