[Wine-patches] [eter-2.1 2/4] gdi32: OffsetClipRgn should update actual clipping region for a EMF DC. (eterbug #8867)
Dmitry Timoshkov
dtimoshkov на etersoft.ru
Пт Фев 15 08:14:47 MSK 2013
(cherry picked from commit 756736ae42bb6939d9d744a5f2c8e3e2318e45ec)
---
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 44dc741..f4c4a43 100644
--- a/dlls/gdi32/enhmfdrv/dc.c
+++ b/dlls/gdi32/enhmfdrv/dc.c
@@ -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 )
diff --git a/dlls/gdi32/tests/metafile.c b/dlls/gdi32/tests/metafile.c
index 115db07..e969c47 100644
--- a/dlls/gdi32/tests/metafile.c
+++ b/dlls/gdi32/tests/metafile.c
@@ -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,
--
1.8.1.3
Подробная информация о списке рассылки Wine-patches