[Bug 36815] New: XFORM matrix rotation is not supported by BitBlt()
wine-bugs at winehq.org
wine-bugs at winehq.org
Fri Jun 27 03:41:25 CDT 2014
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 at winehq.org
Reporter: sashoalm at 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=sharing,
also added as attachment.
Screenshot under Windows:
https://drive.google.com/file/d/0B9PGUhmmnsm1Uzg4d1l0TS1FVlU/edit?usp=sharing
Screenshot under Wine:
https://drive.google.com/file/d/0B9PGUhmmnsm1NHFjSWxGdlpiU28/edit?usp=sharing
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).aspx:
Operation eM11 eM12 eM21 eM22
Rotation Cosine Sine Negative sine Cosine
--
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.
More information about the wine-bugs
mailing list