]> git.mxchange.org Git - flightgear.git/commitdiff
remove obsolete text_width() function (a similiar function will be made
authormfranz <mfranz>
Mon, 31 Jul 2006 16:56:15 +0000 (16:56 +0000)
committermfranz <mfranz>
Mon, 31 Jul 2006 16:56:15 +0000 (16:56 +0000)
a method of TextList)

src/Instrumentation/HUD/HUD.hxx
src/Instrumentation/HUD/HUD_instrument.cxx
src/Instrumentation/HUD/HUD_tape.cxx

index efb1606440df1e81c45d69f753d82c4632b10647..6651ce1c8d3b751e3ed445151a60b350b1b74a14 100644 (file)
@@ -337,7 +337,6 @@ protected:
     void draw_line(float x1, float y1, float x2, float y2);
     void draw_stipple_line(float x1, float y1, float x2, float y2);
     void draw_text(float x, float y, char *msg, int align = 0, int digit = 0);
-    float text_width(char *str) const;
     void draw_circle(float x1, float y1, float r) const;
     void draw_bullet(float, float, float);
 
index d98db887649dabd120fb8daf19c80aacb7bf855d..3b00f0678b79c6bf63e4e5a7f2cdec252e073fc0 100644 (file)
@@ -134,12 +134,3 @@ void HUD::Item::draw_bullet(float x, float y, float size)
 }
 
 
-float HUD::Item::text_width(char *str) const
-{
-    assert(_hud->_font_renderer);
-    float r, l;
-    _hud->_font->getBBox(str, _hud->_font_size, 0, &l, &r, 0, 0);
-    return r - l;
-}
-
-
index 9372c182e0cf46098ec18a41d2d3490b55ce67c1..29f37b391ec88bb066e98ea369088a92d509dacb 100644 (file)
@@ -47,9 +47,6 @@ HUD::Tape::Tape(HUD *hud, const SGPropertyNode *n, float x, float y) :
 
     s = n->getStringValue("tick-length");                    // "variable", "constant"
     _tick_length = strcmp(s, "constant") ? VARIABLE : CONSTANT;
-
-    float top;
-    _hud->_font->getBBox("0", _hud->_font_size, 0.0, 0, 0, 0, &top);
 }