]> Dogcows Code - chaz/openbox/commitdiff
use a BPen in the BFont class for drawing standard X fonts
authorDana Jansens <danakj@orodu.net>
Tue, 9 Jul 2002 06:50:01 +0000 (06:50 +0000)
committerDana Jansens <danakj@orodu.net>
Tue, 9 Jul 2002 06:50:01 +0000 (06:50 +0000)
src/Font.cc

index ac315d507598f72d060c33d03979f55bd593f136..bc4f6440e5b0fe694903d10c18cc21c4eff1eefb 100644 (file)
@@ -275,22 +275,16 @@ void BFont::drawString(Drawable d, int x, int y, const BColor &color,
   }
 #endif // XFT
 
-  BGCCache *_cache = color.display()->gcCache();
-  BGCCacheItem *_item = _cache->find(color, _font, GXcopy, ClipByChildren);
-
-  assert(_cache);
-  assert(_item);
+  BPen pen(color, _font);
 
   if (i18n.multibyte())
-    XmbDrawString(_display, d, _fontset, _item->gc(),
+    XmbDrawString(_display, d, _fontset, pen.gc(),
                   x, y - _fontset_extents->max_ink_extent.y,
                   string.c_str(), string.size());
   else
-    XDrawString(_display, d, _item->gc(),
+    XDrawString(_display, d, pen.gc(),
                 x, _font->ascent + y,
                 string.c_str(), string.size());
-
-  _cache->release(_item);
 }
 
 
This page took 0.024555 seconds and 4 git commands to generate.