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.103 by root, Sun Aug 27 10:10:25 2006 UTC vs.
Revision 1.109 by sasha, Fri Aug 3 05:33:04 2007 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 < 0 || color == Color_bg) 237 if (color == Color_bg || color == Color_transparent)
238 XClearArea (disp, d, x, y, w, h, false); 238 XClearArea (disp, d, x, y, w, h, false);
239 else 239 else if (color >= 0)
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]);
441 *chrs = cc->c2; 441 *chrs = cc->c2;
442 rxvt_font *f2 = (f1->has_char (cc->c2, 0, careful) && !careful) 442 rxvt_font *f2 = (f1->has_char (cc->c2, 0, careful) && !careful)
443 ? f1 443 ? f1
444 : (*fs)[fs->find_font (cc->c2)]; 444 : (*fs)[fs->find_font (cc->c2)];
445 445
446 f2->draw (d, x, y, chrs, width, fg, -1); 446 f2->draw (d, x, y, chrs, width, fg, Color_none);
447 } 447 }
448 } 448 }
449#endif 449#endif
450 else 450 else
451 switch (t) 451 switch (t)
481 const text_t *text, int len, 481 const text_t *text, int len,
482 int fg, int bg); 482 int fg, int bg);
483 483
484 bool slow; // wether this is a proportional font or has other funny characteristics 484 bool slow; // wether this is a proportional font or has other funny characteristics
485 XFontStruct *f; 485 XFontStruct *f;
486 codeset cs;
487 bool enc2b, encm; 486 bool enc2b, encm;
488 487
489 char *get_property (XFontStruct *f, Atom property, const char *repl) const; 488 char *get_property (XFontStruct *f, Atom property, const char *repl) const;
490 bool set_properties (rxvt_fontprop &p, int height, const char *weight, const char *slant, int avgwidth); 489 bool set_properties (rxvt_fontprop &p, int height, const char *weight, const char *slant, int avgwidth);
491 bool set_properties (rxvt_fontprop &p, XFontStruct *f); 490 bool set_properties (rxvt_fontprop &p, XFontStruct *f);
1275 int w = term->fwidth * len; 1274 int w = term->fwidth * len;
1276 int h = term->fheight; 1275 int h = term->fheight;
1277 1276
1278 bool buffered = bg >= 0 // we don't use a transparent bg 1277 bool buffered = bg >= 0 // we don't use a transparent bg
1279#ifndef FORCE_UNBUFFERED_XFT 1278#ifndef FORCE_UNBUFFERED_XFT
1280# if defined(XPM_BACKGROUND) || defined(TRANSPARENT) 1279# ifdef ENABLE_TRANSPARENCY
1281 || !term->am_transparent // we aren't transparent 1280 || !term->am_transparent // we aren't transparent
1282 || term->am_pixmap_trans // we have a pixmap
1283# endif 1281# endif
1284#endif 1282#endif
1285 ; 1283 ;
1286 1284
1287 // cut trailing spaces 1285 // cut trailing spaces
1323 { 1321 {
1324 rxvt_drawable &d2 = d.screen->scratch_drawable (w, h); 1322 rxvt_drawable &d2 = d.screen->scratch_drawable (w, h);
1325 1323
1326 if (0) 1324 if (0)
1327 ; 1325 ;
1328#ifdef TRANSPARENT 1326#if defined(ENABLE_TRANSPARENCY) || defined(XPM_BACKGROUND)
1329 else if (bg < 0 && term->am_pixmap_trans)
1330 XCopyArea (disp, term->pixmap, d2, gc,
1331 x + term->window_vt_x, y + term->window_vt_y,
1332 w, h, 0, 0);
1333#endif
1334#ifdef XPM_BACKGROUND
1335 else if (bg < 0 && term->bgPixmap.pixmap) 1327 else if (bg < 0 && term->bgPixmap.pixmap)
1336 { 1328 {
1329 if (term->bgPixmap.pmap_width >= x + term->window_vt_x+w
1330 && term->bgPixmap.pmap_height >= y + term->window_vt_y+h)
1331 {
1332 XCopyArea (disp, term->bgPixmap.pixmap, d2, gc,
1333 x + term->window_vt_x, y + term->window_vt_y,
1334 w, h, 0, 0);
1335 }
1336 else
1337 {
1337 XGCValues gcv; 1338 XGCValues gcv;
1338 1339
1339 gcv.fill_style = FillTiled; 1340 gcv.fill_style = FillTiled;
1340 gcv.tile = term->pixmap; 1341 gcv.tile = term->bgPixmap.pixmap;
1341 gcv.ts_x_origin = -x; 1342 gcv.ts_x_origin = -x;
1342 gcv.ts_y_origin = -y; 1343 gcv.ts_y_origin = -y;
1343 1344
1345#if 0
1344 GC gc2 = XCreateGC (disp, d2, 1346 GC gc2 = XCreateGC (disp, d2,
1345 GCTile | GCTileStipXOrigin | GCTileStipYOrigin | GCFillStyle, 1347 GCTile | GCTileStipXOrigin | GCTileStipYOrigin | GCFillStyle,
1346 &gcv); 1348 &gcv);
1349#endif
1350 XChangeGC (disp, gc,
1351 GCTile | GCTileStipXOrigin | GCTileStipYOrigin | GCFillStyle,
1352 &gcv);
1347 1353
1348 XFillRectangle (disp, d2, gc2, 0, 0, w, h); 1354 XFillRectangle (disp, d2, gc/*gc2*/, 0, 0, w, h);
1349 1355
1356 gcv.fill_style = FillSolid;
1357 XChangeGC (disp, gc, GCFillStyle, &gcv);
1350 XFreeGC (disp, gc2); 1358 /* XFreeGC (disp, gc2); */
1359
1360 }
1351 } 1361 }
1352#endif 1362#endif
1353 else 1363 else
1354 XftDrawRect (d2, &term->pix_colors[bg].c, 0, 0, w, h); 1364 XftDrawRect (d2, &term->pix_colors[bg].c, 0, 0, w, h);
1355 1365

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines