<p><font size=2 face="sans-serif">Since upgrading to Wine-20040914, we've
noticed that a bug has been introduced in gdi32.dll that causes certain
pen strokes to be drawn with thickness that is far too wide. &nbsp;The
problem is in wine's handling of the STROKEPATH and the STROKEANDFILLPATH
emf records when playing enhanced metafiles. &nbsp; Specifically, there
seems to be a problem with an interaction between wine's temporary setting
of a world transform and a pen selection that happens during processing
of the record. &nbsp; </font>
<p><font size=2 face="sans-serif">In cvs on the Wine HQ site, we notice
that a SelectObject() for the pen was inserted in function DC_UpdateXforms()
in <b>dlls/gdi/dc.c</b> in revision 1.2 as follows:</font>
<br>
<table width=100%>
<tr>
<td width=100%><font size=1><tt>===================================================================<br>
RCS file: /home/wine/wine/dlls/gdi/dc.c,v<br>
retrieving revision 1.1<br>
retrieving revision 1.2<br>
diff -u -p -r1.1 -r1.2<br>
--- wine/dlls/gdi/dc.c &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; 2004/07/21 04:07:28 &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; 1.1<br>
+++ wine/dlls/gdi/dc.c &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; 2004/09/13 18:03:44 &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; 1.2<br>
@@ -262,10 +262,13 @@ void DC_UpdateXforms( DC *dc )<br>
 &nbsp; &nbsp; dc-&gt;vport2WorldValid = DC_InvertXform( &amp;dc-&gt;xformWorld2Vport,<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &amp;dc-&gt;xformVport2World );<br>
 <br>
- &nbsp; &nbsp;/* Reselect the font back into the dc so that the font size<br>
+ &nbsp; &nbsp;/* Reselect the font and pen back into the dc so that the
size<br>
 &nbsp; &nbsp; &nbsp; &nbsp;gets updated. */<br>
 &nbsp; &nbsp; if(memcmp(&amp;oldworld2vport, &amp;dc-&gt;xformWorld2Vport,
sizeof(oldworld2vport)))<br>
+ &nbsp; &nbsp;{<br>
 &nbsp; &nbsp; &nbsp; &nbsp; SelectObject(dc-&gt;hSelf, GetCurrentObject(dc-&gt;hSelf,
OBJ_FONT));<br>
+ &nbsp; &nbsp; &nbsp; &nbsp;SelectObject(dc-&gt;hSelf, GetCurrentObject(dc-&gt;hSelf,
OBJ_PEN));<br>
+ &nbsp; &nbsp;}<br>
 }</tt></font><font size=3><tt><br>
</tt></font></table>
<br><font size=2 face="sans-serif">The pen is set after the call that modifies
the world transform to the identity and before it is reset back to its
normal values.</font>
<p><font size=2 face="sans-serif">If we remove the call to SelectObject
that selects the pen (shown in the code above), the bug disappears.</font>
<p><font size=2 face="sans-serif">Advice on the best way to proceed would
be greatly appreciated.</font>
<p><font size=2 face="sans-serif">1) &nbsp;Why was this change made? </font>
<p><font size=2 face="sans-serif">2) &nbsp;Is the best fix simply to undo
this change or is there a better solution &nbsp;(e.g. fix the strokepath
implementation)?</font>