When DC mapping changes reselect current pen to update physical width

Dmitry Timoshkov dmitry at baikal.ru
Sun Sep 12 03:38:23 CDT 2004


Hello,

this patch is inspired by an old article about GDI objects. We already
reselect font objects but miss pens.

Changelog:
    Dmitry Timoshkov <dmitry at codeweavers.com>
    When DC mapping changes reselect current pen to update physical width.

--- cvs/hq/wine/dlls/gdi/dc.c	Wed Jul 21 04:07:28 2004
+++ wine/dlls/gdi/dc.c	Sun Sep 12 08:24:40 2004
@@ -262,10 +262,13 @@ void DC_UpdateXforms( DC *dc )
     dc->vport2WorldValid = DC_InvertXform( &dc->xformWorld2Vport,
         &dc->xformVport2World );
 
-    /* Reselect the font back into the dc so that the font size
+    /* Reselect the font and pen back into the dc so that the size
        gets updated. */
     if(memcmp(&oldworld2vport, &dc->xformWorld2Vport, sizeof(oldworld2vport)))
+    {
         SelectObject(dc->hSelf, GetCurrentObject(dc->hSelf, OBJ_FONT));
+        SelectObject(dc->hSelf, GetCurrentObject(dc->hSelf, OBJ_PEN));
+    }
 }
 
 






More information about the wine-patches mailing list