https://bugs.winehq.org/show_bug.cgi?id=40913
Bug ID: 40913 Summary: EMF doesn't generate a default EMR_SETARCDIRECTION Record Product: Wine Version: 1.9.13 Hardware: x86 OS: Linux Status: NEW Severity: normal Priority: P2 Component: gdi32 Assignee: wine-bugs@winehq.org Reporter: leslie_alistair@hotmail.com Distribution: ---
Created attachment 55011 --> https://bugs.winehq.org/attachment.cgi?id=55011 testcase
The attached test case shows that one less record is created when run under wine. This happens to the EMR_SETARCDIRECTION record, which appears to be inserted automatically before the first draw function call.
https://bugs.winehq.org/show_bug.cgi?id=40913
Alistair Leslie-Hughes leslie_alistair@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |testcase
https://bugs.winehq.org/show_bug.cgi?id=40913
--- Comment #1 from Dmitry Timoshkov dmitry@baikal.ru --- (In reply to Alistair Leslie-Hughes from comment #0)
Created attachment 55011 [details] testcase
+ SetMapMode(mf, MM_ANISOTROPIC); + SetWindowExtEx(mf, 1, 1, &size); + SetViewportExtEx(mf, 1, -1, &size); + + ret = SaveDC(mf); + ok(ret == 1, "ret = %d\n", ret);
Are the above calls really required to reproduce the problem? If not, please remove them, they make the generated metafile more complex.
https://bugs.winehq.org/show_bug.cgi?id=40913
Alistair Leslie-Hughes leslie_alistair@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #55011|0 |1 is obsolete| |
--- Comment #2 from Alistair Leslie-Hughes leslie_alistair@hotmail.com --- Created attachment 55014 --> https://bugs.winehq.org/attachment.cgi?id=55014 Simplified Testcase
This is the smallest test case I found to reproduce the issue.
https://bugs.winehq.org/show_bug.cgi?id=40913
--- Comment #3 from Dmitry Timoshkov dmitry@baikal.ru --- (In reply to Alistair Leslie-Hughes from comment #2)
Created attachment 55014 [details] Simplified Testcase
This is the smallest test case I found to reproduce the issue.
+ mf = CreateEnhMetaFileA( GetDC( 0 ), NULL, NULL, NULL ); + ok( mf != 0, "CreateEnhMetaFileA error %d\n", GetLastError() ); + + SetMapMode(mf, MM_ANISOTROPIC); + SetViewportExtEx(mf, 1, -1, &size); + + /* A EMR_SETARCDIRECTION record is inserted here. */ + + ret = Arc(mf, 342, -215, 442, -315, 342, -265, 442, -265); + ok( ret, "Arc failed error %d\n", GetLastError() );
What happens if you don't call SetMapMode and/or SetViewportExtEx?
https://bugs.winehq.org/show_bug.cgi?id=40913
--- Comment #4 from Alistair Leslie-Hughes leslie_alistair@hotmail.com --- (In reply to Dmitry Timoshkov from comment #3)
(In reply to Alistair Leslie-Hughes from comment #2)
What happens if you don't call SetMapMode and/or SetViewportExtEx?
The SetArcDirection record isn't created.
https://bugs.winehq.org/show_bug.cgi?id=40913
--- Comment #5 from Dmitry Timoshkov dmitry@baikal.ru --- (In reply to Alistair Leslie-Hughes from comment #4)
What happens if you don't call SetMapMode and/or SetViewportExtEx?
The SetArcDirection record isn't created.
That cases deserve their own tests then (in order to make sure that the record is being generated only when appropriate).