1 | /*--------------------------------*-C-*---------------------------------* |
1 | /*----------------------------------------------------------------------* |
2 | * File: rxvtfont.C |
2 | * File: rxvtfont.C |
3 | *----------------------------------------------------------------------* |
3 | *----------------------------------------------------------------------* |
4 | * Copyright (c) 2003-2006 Marc Lehmann <pcg@goof.com> |
4 | * Copyright (c) 2003-2006 Marc Lehmann <pcg@goof.com> |
5 | * - original version. |
5 | * - original version. |
6 | * |
6 | * |
… | |
… | |
1274 | dTermGC; |
1274 | dTermGC; |
1275 | |
1275 | |
1276 | int w = term->fwidth * len; |
1276 | int w = term->fwidth * len; |
1277 | int h = term->fheight; |
1277 | int h = term->fheight; |
1278 | |
1278 | |
|
|
1279 | bool buffered = 0 |
|
|
1280 | #if defined(XPM_BACKGROUND) || defined(TRANSPARENT) |
1279 | bool buffered = !term->am_transparent // we aren't transparent |
1281 | || !term->am_transparent // we aren't transparent |
1280 | || term->am_pixmap_trans // we have a pixmap |
1282 | || term->am_pixmap_trans // we have a pixmap |
|
|
1283 | #endif |
1281 | || bg >= 0; // we don't use a transparent bg |
1284 | || bg >= 0; // we don't use a transparent bg |
1282 | |
1285 | |
1283 | // cut trailing spaces |
1286 | // cut trailing spaces |
1284 | while (len && text [len - 1] == ' ') |
1287 | while (len && text [len - 1] == ' ') |
1285 | len--; |
1288 | len--; |
… | |
… | |
1317 | { |
1320 | { |
1318 | if (ep != enc) |
1321 | if (ep != enc) |
1319 | { |
1322 | { |
1320 | rxvt_drawable &d2 = d.screen->scratch_drawable (w, h); |
1323 | rxvt_drawable &d2 = d.screen->scratch_drawable (w, h); |
1321 | |
1324 | |
|
|
1325 | #if defined(XPM_BACKGROUND) || defined(TRANSPARENT) |
1322 | if (bg < 0 && term->am_pixmap_trans) |
1326 | if (bg < 0 && term->am_pixmap_trans) |
1323 | XCopyArea (disp, term->pixmap, d2, gc, x, y, w, h, 0, 0); |
1327 | XCopyArea (disp, term->pixmap, d2, gc, x, y, w, h, 0, 0); |
1324 | else if (bg < 0 && term->bgPixmap.pixmap) |
1328 | else if (bg < 0 && term->bgPixmap.pixmap) |
1325 | { |
1329 | { |
1326 | XGCValues gcv; |
1330 | XGCValues gcv; |
… | |
… | |
1337 | XFillRectangle (disp, d2, gc2, 0, 0, w, h); |
1341 | XFillRectangle (disp, d2, gc2, 0, 0, w, h); |
1338 | |
1342 | |
1339 | XFreeGC (disp, gc2); |
1343 | XFreeGC (disp, gc2); |
1340 | } |
1344 | } |
1341 | else |
1345 | else |
|
|
1346 | #endif |
1342 | XftDrawRect (d2, &term->pix_colors[bg].c, 0, 0, w, h); |
1347 | XftDrawRect (d2, &term->pix_colors[bg].c, 0, 0, w, h); |
1343 | |
1348 | |
1344 | XftDrawGlyphSpec (d2, &term->pix_colors[fg].c, f, enc, ep - enc); |
1349 | XftDrawGlyphSpec (d2, &term->pix_colors[fg].c, f, enc, ep - enc); |
1345 | XCopyArea (disp, d2, d, gc, 0, 0, w, h, x, y); |
1350 | XCopyArea (disp, d2, d, gc, 0, 0, w, h, x, y); |
1346 | } |
1351 | } |