ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/rxvtfont.C
(Generate patch)

Comparing rxvt-unicode/src/rxvtfont.C (file contents):
Revision 1.95 by root, Sat Feb 18 14:14:43 2006 UTC vs.
Revision 1.96 by root, Sat Feb 18 15:24:39 2006 UTC

232rxvt_font::clear_rect (rxvt_drawable &d, int x, int y, int w, int h, int color) const 232rxvt_font::clear_rect (rxvt_drawable &d, int x, int y, int w, int h, int color) const
233{ 233{
234 dTermDisplay; 234 dTermDisplay;
235 dTermGC; 235 dTermGC;
236 236
237 if (color == Color_bg) 237 if (color < 0 || color == Color_bg)
238 XClearArea (disp, d, x, y, w, h, false); 238 XClearArea (disp, d, x, y, w, h, false);
239 else if (color >= 0) 239 else
240 { 240 {
241#if XFT 241#if XFT
242 XftDrawRect (d, &term->pix_colors[color].c, x, y, w, h); 242 XftDrawRect (d, &term->pix_colors[color].c, x, y, w, h);
243#else 243#else
244 XSetForeground (disp, gc, term->pix_colors[color]); 244 XSetForeground (disp, gc, term->pix_colors[color]);
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 = false; 1279 bool buffered = !term->am_transparent // we aren't transparent
1280 || term->am_pixmap_trans // we have a pixmap
1281 || bg >= 0; // we don't use a transparent bg
1280 1282
1281 // cut trailing spaces 1283 // cut trailing spaces
1282 while (len && text [len - 1] == ' ') 1284 while (len && text [len - 1] == ' ')
1283 len--; 1285 len--;
1284 1286
1315 { 1317 {
1316 if (ep != enc) 1318 if (ep != enc)
1317 { 1319 {
1318 rxvt_drawable &d2 = d.screen->scratch_drawable (w, h); 1320 rxvt_drawable &d2 = d.screen->scratch_drawable (w, h);
1319 1321
1322 if (bg < 0 && term->am_pixmap_trans)
1323 XCopyArea (disp, term->pixmap, d2, gc, x, y, w, h, 0, 0);
1324 else if (bg < 0 && term->bgPixmap.pixmap)
1325 {
1326 XGCValues gcv;
1327
1328 gcv.fill_style = FillTiled;
1329 gcv.tile = term->pixmap;
1330 gcv.ts_x_origin = -x;
1331 gcv.ts_y_origin = -y;
1332
1333 GC gc2 = XCreateGC (disp, d2,
1334 GCTile | GCTileStipXOrigin | GCTileStipYOrigin | GCFillStyle,
1335 &gcv);
1336
1337 XFillRectangle (disp, d2, gc2, 0, 0, w, h);
1338
1339 XFreeGC (disp, gc2);
1340 }
1341 else
1320 XftDrawRect (d2, &term->pix_colors[bg].c, 0, 0, w, h); 1342 XftDrawRect (d2, &term->pix_colors[bg].c, 0, 0, w, h);
1321 1343
1322 XftDrawGlyphSpec (d2, &term->pix_colors[fg].c, f, enc, ep - enc); 1344 XftDrawGlyphSpec (d2, &term->pix_colors[fg].c, f, enc, ep - enc);
1323 XCopyArea (disp, d2, d, gc, 0, 0, w, h, x, y); 1345 XCopyArea (disp, d2, d, gc, 0, 0, w, h, x, y);
1324 } 1346 }
1325 else 1347 else

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines