[Wine-patches] Fwd: [eter-2.1] gdi32: Make sure that actual clipping region is updated for a EMF DC. (eterbug #8867)
Roman Dadkov
romand на etersoft.ru
Чт Фев 14 13:42:55 MSK 2013
From: Dmitry Timoshkov <dtimoshkov на etersoft.ru>
Subject: [PATCH] gdi32: Make sure that actual clipping region is
updated for a EMF DC. (eterbug #8867)
---
dlls/gdi32/enhmfdrv/dc.c | 3 ++-
dlls/gdi32/tests/metafile.c | 11 +++++------
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/dlls/gdi32/enhmfdrv/dc.c b/dlls/gdi32/enhmfdrv/dc.c
index 817872c..44dc741 100644
--- a/dlls/gdi32/enhmfdrv/dc.c
+++ b/dlls/gdi32/enhmfdrv/dc.c
@@ -191,6 +191,7 @@ INT EMFDRV_OffsetClipRgn( PHYSDEV dev, INT x, INT y
)
INT EMFDRV_ExtSelectClipRgn( PHYSDEV dev, HRGN hrgn, INT mode )
{
+ PHYSDEV next = GET_NEXT_PHYSDEV( dev, pExtSelectClipRgn );
EMREXTSELECTCLIPRGN *emr;
DWORD size, rgnsize;
BOOL ret;
@@ -213,7 +214,7 @@ INT EMFDRV_ExtSelectClipRgn( PHYSDEV dev, HRGN
hrgn, INT mode )
ret = EMFDRV_WriteRecord( dev, &emr->emr );
HeapFree( GetProcessHeap(), 0, emr );
- return ret ? SIMPLEREGION : ERROR;
+ return ret ? next->funcs->pExtSelectClipRgn( next, hrgn, mode ) :
ERROR;
}
INT EMFDRV_SetMapMode( PHYSDEV dev, INT mode )
diff --git a/dlls/gdi32/tests/metafile.c b/dlls/gdi32/tests/metafile.c
index e4413db..2623847 100644
--- a/dlls/gdi32/tests/metafile.c
+++ b/dlls/gdi32/tests/metafile.c
@@ -2477,14 +2477,13 @@ static void test_emf_clipping(void)
SetRect(&rc_sclip, 100, 100, GetSystemMetrics(SM_CXSCREEN),
GetSystemMetrics(SM_CYSCREEN));
hrgn = CreateRectRgn(rc_sclip.left, rc_sclip.top, rc_sclip.right,
rc_sclip.bottom);
SelectClipRgn(hdc, hrgn);
+ SetRect(&rc_res, -1, -1, -1, -1);
ret = GetClipBox(hdc, &rc_res);
-todo_wine
ok(ret == SIMPLEREGION, "got %d\n", ret);
- if(ret == SIMPLEREGION)
- ok(EqualRect(&rc_res, &rc_sclip),
- "expected rc_res (%d, %d) - (%d, %d), got (%d, %d) -
(%d, %d)\n",
- rc_sclip.left, rc_sclip.top, rc_sclip.right,
rc_sclip.bottom,
- rc_res.left, rc_res.top, rc_res.right,
rc_res.bottom);
+ ok(EqualRect(&rc_res, &rc_sclip),
+ "expected rc_res (%d,%d)-(%d,%d), got (%d,%d)-(%d,%d)\n",
+ 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);
DeleteEnhMetaFile(hemf);
--
1.8.1.3
_______________________________________________
Wine-patches mailing list
Wine-patches на lists.etersoft.ru
http://lists.etersoft.ru/mailman/listinfo/wine-patches
Подробная информация о списке рассылки Wine-patches