patch for underline and strikeout text in xrender
Vincent Béron
vberon at mecano.gme.usherb.ca
Wed Aug 27 16:43:40 CDT 2003
Le mer 27/08/2003 à 17:34, Dimitrie O. Paun a écrit :
> On Wed, 27 Aug 2003 Dave_Belanger at cimmetry.com wrote:
...
> + if (lf.lfUnderline) {
...
> + TSXDrawLine( gdi_display, physDev->drawable, physDev->gc,
> + physDev->org.x + x, physDev->org.y + y + linePos,
> + physDev->org.x + x + width, physDev->org.y + y + linePos );
...
> + if (lf.lfStrikeOut) {
...
> + TSXDrawLine( gdi_display, physDev->drawable, physDev->gc,
> + physDev->org.x + x, physDev->org.y + y - linePos,
> + physDev->org.x + x + width, physDev->org.y + y - linePos );
>
> What about we simplify this a bit:
>
> if (lf.lfUnderline || lf.lfStrikeOut) {
> long linePos = (lf.lfUnderline ? tm.tmDescent / 2 : - tm.tmAscent / 3.5);
>
> TSXSetForeground( gdi_display, physDev->gc, physDev->textPixel );
> TSXSetLineAttributes( gdi_display, physDev->gc, lineWidth,
> LineSolid, CapProjecting, JoinBevel );
> TSXDrawLine( gdi_display, physDev->drawable, physDev->gc,
> physDev->org.x + x, physDev->org.y + y + linePos,
> physDev->org.x + x + width, physDev->org.y + y + linePos );
> }
Not sure it'll do the same thing, it's +linePos in the first case and
-linePos in the second...
Vincent
More information about the wine-devel
mailing list