https://bugs.winehq.org/show_bug.cgi?id=36815
Bug ID: 36815 Summary: XFORM matrix rotation is not supported by BitBlt() Product: Wine Version: 1.7.19 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: gdi32 Assignee: wine-bugs@winehq.org Reporter: sashoalm@gmail.com
Created attachment 48892 --> https://bugs.winehq.org/attachment.cgi?id=48892 Demo project.
When a rotation is specified using the XFORM matrix, and later a bitmap is drawn using BitBlt(), it is rotated in Windows, but it is not rotated in Wine (it seems to be scaled instead).
Demo project: https://drive.google.com/file/d/0B9PGUhmmnsm1Z3YtRXJxdnNpNUE/edit?usp=sharin..., also added as attachment.
Screenshot under Windows: https://drive.google.com/file/d/0B9PGUhmmnsm1Uzg4d1l0TS1FVlU/edit?usp=sharin... Screenshot under Wine: https://drive.google.com/file/d/0B9PGUhmmnsm1NHFjSWxGdlpiU28/edit?usp=sharin...
These are the most relevant parts of the demo code. Here the XFORM matrix is prepared, and the BitBlt() is called:
====== // Set the XFORM rotation. XFORM xform; memset(&xform, 0, sizeof(xform)); double angle = 0.785398163; xform.eM11 = cos(angle); xform.eM12 = sin(angle); xform.eM21 = -sin(angle); xform.eM22 = cos(angle); xform.eDx = 0; xform.eDy = 0; SetGraphicsMode(hdc, GM_ADVANCED); SetWorldTransform(hdc, &xform);
// Draw the bitmap on the paint . BitBlt(hdc, r->left, r->top, r->right-r->left, r->bottom-r->top, hMemDC, 0, 0, SRCCOPY); ======
How to specify rotation in the XFORM matrix is described in MSDN's at http://msdn.microsoft.com/en-us/library/windows/desktop/dd145228(v=vs.85).as...:
Operation eM11 eM12 eM21 eM22 Rotation Cosine Sine Negative sine Cosine
https://bugs.winehq.org/show_bug.cgi?id=36815
Alexander Almaleh sashoalm@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Version|1.7.19 |1.7.20
https://bugs.winehq.org/show_bug.cgi?id=36815
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download, source, testcase
https://bugs.winehq.org/show_bug.cgi?id=36815
Julian Rüger jr98@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jr98@gmx.net
https://bugs.winehq.org/show_bug.cgi?id=36815
zaplo00@mailfence.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |zaplo00@mailfence.com
--- Comment #1 from zaplo00@mailfence.com --- Created attachment 61627 --> https://bugs.winehq.org/attachment.cgi?id=61627 wine-3.10 image
I built this with winemaker xformbug.dsp && make (Makefile needed -mno-cygwin in CXXEXTRA to succeed) and got the same result as reporter in wine-3.10.
https://bugs.winehq.org/show_bug.cgi?id=36815
Zhiyi Zhang zzhang@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |zzhang@codeweavers.com