Dmitry Timoshkov : winex11.drv: The MAT2 parameter of GetGlyphOutline is mandatory.

Alexandre Julliard julliard at winehq.org
Tue Feb 3 09:13:11 CST 2009


Module: wine
Branch: master
Commit: f6230530223210f4332d9510cfd3ae3f4aa9d949
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=f6230530223210f4332d9510cfd3ae3f4aa9d949

Author: Dmitry Timoshkov <dmitry at codeweavers.com>
Date:   Tue Feb  3 17:54:48 2009 +0800

winex11.drv: The MAT2 parameter of GetGlyphOutline is mandatory.

---

 dlls/winex11.drv/opengl.c  |    6 ++++--
 dlls/winex11.drv/xrender.c |    9 ++++-----
 2 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c
index 2aa5afa..d43f03e 100644
--- a/dlls/winex11.drv/opengl.c
+++ b/dlls/winex11.drv/opengl.c
@@ -1902,7 +1902,8 @@ static BOOL internal_wglUseFontBitmaps(HDC hdc, DWORD first, DWORD count, DWORD
      wine_tsx11_unlock();
 
      for (glyph = first; glyph < first + count; glyph++) {
-         unsigned int needed_size = GetGlyphOutline_ptr(hdc, glyph, GGO_BITMAP, &gm, 0, NULL, NULL);
+         static const MAT2 identity = { {0,1},{0,0},{0,0},{0,1} };
+         unsigned int needed_size = GetGlyphOutline_ptr(hdc, glyph, GGO_BITMAP, &gm, 0, NULL, &identity);
          unsigned int height, width_int;
 
          TRACE("Glyph : %3d / List : %d\n", glyph, listBase);
@@ -1920,7 +1921,8 @@ static BOOL internal_wglUseFontBitmaps(HDC hdc, DWORD first, DWORD count, DWORD
              bitmap = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, size);
              gl_bitmap = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, size);
          }
-         if (GetGlyphOutline_ptr(hdc, glyph, GGO_BITMAP, &gm, size, bitmap, NULL) == GDI_ERROR) goto error;
+         if (GetGlyphOutline_ptr(hdc, glyph, GGO_BITMAP, &gm, size, bitmap, &identity) == GDI_ERROR)
+             goto error;
          if (TRACE_ON(wgl)) {
              unsigned int height, width, bitmask;
              unsigned char *bitmap_ = bitmap;
diff --git a/dlls/winex11.drv/xrender.c b/dlls/winex11.drv/xrender.c
index fd405be..a7414a6 100644
--- a/dlls/winex11.drv/xrender.c
+++ b/dlls/winex11.drv/xrender.c
@@ -666,6 +666,7 @@ static BOOL UploadGlyph(X11DRV_PDEVICE *physDev, int glyph, AA_Type format)
     XRenderPictFormat pf;
     unsigned long pf_mask;
     static const char zero[4];
+    static const MAT2 identity = { {0,1},{0,0},{0,0},{0,1} };
 
     switch(format) {
     case AA_Grey:
@@ -691,15 +692,13 @@ static BOOL UploadGlyph(X11DRV_PDEVICE *physDev, int glyph, AA_Type format)
 	break;
     }
 
-    buflen = GetGlyphOutlineW(physDev->hdc, glyph, ggo_format, &gm, 0, NULL,
-			      NULL);
+    buflen = GetGlyphOutlineW(physDev->hdc, glyph, ggo_format, &gm, 0, NULL, &identity);
     if(buflen == GDI_ERROR) {
         if(format != AA_None) {
             format = AA_None;
             entry->aa_default = AA_None;
             ggo_format = GGO_GLYPH_INDEX | GGO_BITMAP;
-            buflen = GetGlyphOutlineW(physDev->hdc, glyph, ggo_format, &gm, 0, NULL,
-                                      NULL);
+            buflen = GetGlyphOutlineW(physDev->hdc, glyph, ggo_format, &gm, 0, NULL, &identity);
         }
         if(buflen == GDI_ERROR) {
             WARN("GetGlyphOutlineW failed\n");
@@ -800,7 +799,7 @@ static BOOL UploadGlyph(X11DRV_PDEVICE *physDev, int glyph, AA_Type format)
 
 
     buf = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, buflen);
-    GetGlyphOutlineW(physDev->hdc, glyph, ggo_format, &gm, buflen, buf, NULL);
+    GetGlyphOutlineW(physDev->hdc, glyph, ggo_format, &gm, buflen, buf, &identity);
     formatEntry->realized[glyph] = TRUE;
 
     TRACE("buflen = %d. Got metrics: %dx%d adv=%d,%d origin=%d,%d\n",




More information about the wine-cvs mailing list