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
wine_tsx11_lock();
XSetForeground( gdi_display, physDev->gc, textPixel );
if(aa_type == AA_None) {
for(idx = 0; idx < count; idx++) {
SharpGlyphMono(physDev, physDev->dc_rect.left + x + xoff,
physDev->dc_rect.top + y + yoff,
formatEntry->bitmaps[wstr[idx]],
&formatEntry->gis[wstr[idx]]);
if(lpDx) {
offset += lpDx[idx];
xoff = offset * cosEsc;
yoff = offset * -sinEsc;
} else {
xoff += formatEntry->gis[wstr[idx]].xOff;
yoff += formatEntry->gis[wstr[idx]].yOff;
}
}
} else if(physDev->depth == 1) {
if(aa_type == AA_None || physDev->depth == 1)
{
void (* sharp_glyph_fn)(X11DRV_PDEVICE *, INT, INT, void *, XGlyphInfo *);
if(aa_type == AA_None)
sharp_glyph_fn = SharpGlyphMono;
else
sharp_glyph_fn = SharpGlyphGray;
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,
formatEntry->bitmaps[wstr[idx]],
&formatEntry->gis[wstr[idx]]);
......@@ -1330,7 +1323,6 @@ BOOL X11DRV_XRender_ExtTextOut( X11DRV_PDEVICE *physDev, INT x, INT y, UINT flag
xoff += formatEntry->gis[wstr[idx]].xOff;
yoff += formatEntry->gis[wstr[idx]].yOff;
}
}
} else {
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