[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wine-devel
Subject:    rotated text in ExtTextOut
From:       Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006 () gmx ! net>
Date:       2006-10-31 15:55:09
Message-ID: 454771DD.4080205 () gmx ! net
[Download RAW message or body]

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

["redux03.wmf" (image/x-wmf)]



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic