rotated text in ExtTextOut

Carl-Daniel Hailfinger c-d.hailfinger.devel.2006 at gmx.net
Tue Oct 31 09:55:09 CST 2006


Hi,

I have a problem displaying rotated text in Wine where the
rotation under Windows is counterclockwise, but the rotation
in Wine is clockwise.
The patch I came up with rotates the text in the right direction,
but the individual characters are still rotated in the wrong
direction.
The attached WMF file shows the bug.

Any help/criticism would be appreciated.

diff --git a/dlls/gdi32/font.c b/dlls/gdi32/font.c
index 24f16dd..24dac20 100644
--- a/dlls/gdi32/font.c
+++ b/dlls/gdi32/font.c
@@ -1820,6 +1820,11 @@ BOOL WINAPI ExtTextOutW( HDC hdc, INT x,
     {
         cosEsc = cos(lf.lfEscapement * M_PI / 1800);
         sinEsc = sin(lf.lfEscapement * M_PI / 1800);
+        if (lf.lfClipPrecision & CLIP_LH_ANGLES)
+        {
+            FIXME("rotated text flag with flag CLIP_LH_ANGLES unimplemented, trying to fix it up\n");
+            sinEsc = - sinEsc;
+        }
     }
     else
     {
diff --git a/dlls/winex11.drv/xrender.c b/dlls/winex11.drv/xrender.c
index 1fe30f6..21eaad6 100644
--- a/dlls/winex11.drv/xrender.c
+++ b/dlls/winex11.drv/xrender.c
@@ -1135,6 +1135,11 @@ BOOL X11DRV_XRender_ExtTextOut( X11DRV_P
     if(lf.lfEscapement != 0) {
         cosEsc = cos(lf.lfEscapement * M_PI / 1800);
         sinEsc = sin(lf.lfEscapement * M_PI / 1800);
+        if (lf.lfClipPrecision & CLIP_LH_ANGLES)
+        {
+            FIXME("rotated text flag with flag CLIP_LH_ANGLES unimplemented, trying to fix it up\n");
+            sinEsc = - sinEsc;
+        }
     } else {
         cosEsc = 1;
         sinEsc = 0;


Regards,
Carl-Daniel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: redux03.wmf
Type: image/x-wmf
Size: 3266 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-devel/attachments/20061031/11b3ad52/redux03-0001.bin


More information about the wine-devel mailing list