Commit 4edc46cb authored by Huw Davies's avatar Huw Davies Committed by Alexandre Julliard

winex11.drv: Merge some common code.

parent 8178f8fc
...@@ -1301,24 +1301,17 @@ BOOL X11DRV_XRender_ExtTextOut( X11DRV_PDEVICE *physDev, INT x, INT y, UINT flag ...@@ -1301,24 +1301,17 @@ BOOL X11DRV_XRender_ExtTextOut( X11DRV_PDEVICE *physDev, INT x, INT y, UINT flag
wine_tsx11_lock(); wine_tsx11_lock();
XSetForeground( gdi_display, physDev->gc, textPixel ); XSetForeground( gdi_display, physDev->gc, textPixel );
if(aa_type == AA_None) { if(aa_type == AA_None || physDev->depth == 1)
for(idx = 0; idx < count; idx++) { {
SharpGlyphMono(physDev, physDev->dc_rect.left + x + xoff, void (* sharp_glyph_fn)(X11DRV_PDEVICE *, INT, INT, void *, XGlyphInfo *);
physDev->dc_rect.top + y + yoff,
formatEntry->bitmaps[wstr[idx]], if(aa_type == AA_None)
&formatEntry->gis[wstr[idx]]); sharp_glyph_fn = SharpGlyphMono;
if(lpDx) { else
offset += lpDx[idx]; sharp_glyph_fn = SharpGlyphGray;
xoff = offset * cosEsc;
yoff = offset * -sinEsc;
} else {
xoff += formatEntry->gis[wstr[idx]].xOff;
yoff += formatEntry->gis[wstr[idx]].yOff;
}
}
} else if(physDev->depth == 1) {
for(idx = 0; idx < count; idx++) { for(idx = 0; idx < count; idx++) {
SharpGlyphGray(physDev, physDev->dc_rect.left + x + xoff, sharp_glyph_fn(physDev, physDev->dc_rect.left + x + xoff,
physDev->dc_rect.top + y + yoff, physDev->dc_rect.top + y + yoff,
formatEntry->bitmaps[wstr[idx]], formatEntry->bitmaps[wstr[idx]],
&formatEntry->gis[wstr[idx]]); &formatEntry->gis[wstr[idx]]);
...@@ -1330,7 +1323,6 @@ BOOL X11DRV_XRender_ExtTextOut( X11DRV_PDEVICE *physDev, INT x, INT y, UINT flag ...@@ -1330,7 +1323,6 @@ BOOL X11DRV_XRender_ExtTextOut( X11DRV_PDEVICE *physDev, INT x, INT y, UINT flag
xoff += formatEntry->gis[wstr[idx]].xOff; xoff += formatEntry->gis[wstr[idx]].xOff;
yoff += formatEntry->gis[wstr[idx]].yOff; yoff += formatEntry->gis[wstr[idx]].yOff;
} }
} }
} else { } else {
XImage *image; XImage *image;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment