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.111 by sasha, Fri Aug 17 22:01:33 2007 UTC vs.
Revision 1.118 by sasha, Wed Sep 12 19:51:41 2007 UTC

1322 { 1322 {
1323 rxvt_drawable &d2 = d.screen->scratch_drawable (w, h); 1323 rxvt_drawable &d2 = d.screen->scratch_drawable (w, h);
1324 bool back_rendered = false; 1324 bool back_rendered = false;
1325 1325
1326#ifdef HAVE_BG_PIXMAP 1326#ifdef HAVE_BG_PIXMAP
1327 if (term->bgPixmap.pixmap && (bg < 0 || term->pix_colors[bg].c.color.alpha < 0x0ff00)) 1327 if (term->bgPixmap.pixmap)
1328 { 1328 {
1329 if (term->bgPixmap.pmap_width >= x + term->window_vt_x+w 1329 Picture dst = 0;
1330 && term->bgPixmap.pmap_height >= y + term->window_vt_y+h) 1330
1331 if (bg >= 0 && term->pix_colors[bg].c.color.alpha < 0x0ff00)
1332 dst = XftDrawPicture (d2);
1333
1334 if (bg < 0 || dst != 0)
1331 { 1335 {
1336 int src_x = x, src_y = y ;
1337
1338 if (term->bgPixmap.is_parentOrigin ())
1339 {
1340 src_x += term->window_vt_x;
1341 src_y += term->window_vt_y;
1342 }
1343
1344 if (term->bgPixmap.pmap_width >= src_x+w
1345 && term->bgPixmap.pmap_height >= src_y+h)
1346 {
1332 XCopyArea (disp, term->bgPixmap.pixmap, d2, gc, 1347 XCopyArea (disp, term->bgPixmap.pixmap, d2, gc,
1333 x + term->window_vt_x, y + term->window_vt_y,
1334 w, h, 0, 0); 1348 src_x, src_y, w, h, 0, 0);
1335 } 1349 }
1336 else 1350 else
1337 { 1351 {
1338 XGCValues gcv; 1352 XGCValues gcv;
1339 1353
1340 gcv.fill_style = FillTiled; 1354 gcv.fill_style = FillTiled;
1341 gcv.tile = term->bgPixmap.pixmap; 1355 gcv.tile = term->bgPixmap.pixmap;
1342 gcv.ts_x_origin = -x; 1356 gcv.ts_x_origin = -src_x;
1343 gcv.ts_y_origin = -y; 1357 gcv.ts_y_origin = -src_y;
1344 1358
1345#if 0
1346 GC gc2 = XCreateGC (disp, d2,
1347 GCTile | GCTileStipXOrigin | GCTileStipYOrigin | GCFillStyle,
1348 &gcv);
1349#endif
1350 XChangeGC (disp, gc, 1359 XChangeGC (disp, gc,
1351 GCTile | GCTileStipXOrigin | GCTileStipYOrigin | GCFillStyle, 1360 GCTile | GCTileStipXOrigin | GCTileStipYOrigin | GCFillStyle,
1352 &gcv); 1361 &gcv);
1353 1362
1354 XFillRectangle (disp, d2, gc/*gc2*/, 0, 0, w, h); 1363 XFillRectangle (disp, d2, gc, 0, 0, w, h);
1355 1364
1356 gcv.fill_style = FillSolid; 1365 gcv.fill_style = FillSolid;
1357 XChangeGC (disp, gc, GCFillStyle, &gcv); 1366 XChangeGC (disp, gc, GCFillStyle, &gcv);
1358 /* XFreeGC (disp, gc2); */
1359
1360 } 1367 }
1368
1361 if (bg > 0) 1369 if (bg >= 0)
1362 {
1363 Picture dst = XftDrawPicture(d2);
1364 if (dst != 0)
1365 { 1370 {
1366 Picture solid_color_pict = XftDrawSrcPicture (d2, &term->pix_colors[bg].c); 1371 Picture solid_color_pict = XftDrawSrcPicture (d2, &term->pix_colors[bg].c);
1367 XRenderComposite (disp, PictOpOver, solid_color_pict, None, dst, 0, 0, 0, 0, 0, 0, w, h); 1372 XRenderComposite (disp, PictOpOver, solid_color_pict, None, dst, 0, 0, 0, 0, 0, 0, w, h);
1368 } 1373 }
1374
1375 back_rendered = true;
1369 } 1376 }
1370 back_rendered = true;
1371 } 1377 }
1372#endif 1378#endif
1373 1379
1374 if(bg > 0 && !back_rendered) 1380 if (bg >= 0 && !back_rendered)
1375 XftDrawRect (d2, &term->pix_colors[bg].c, 0, 0, w, h); 1381 XftDrawRect (d2, &term->pix_colors[bg].c, 0, 0, w, h);
1376 1382
1377 XftDrawGlyphSpec (d2, &term->pix_colors[fg].c, f, enc, ep - enc); 1383 XftDrawGlyphSpec (d2, &term->pix_colors[fg].c, f, enc, ep - enc);
1378 XCopyArea (disp, d2, d, gc, 0, 0, w, h, x, y); 1384 XCopyArea (disp, d2, d, gc, 0, 0, w, h, x, y);
1379 } 1385 }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines