remove unneede functions

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4602 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
André Pönitz 2002-07-11 14:28:11 +00:00
parent 9b2be91bed
commit 86323de88f
2 changed files with 11 additions and 37 deletions

View File

@ -372,20 +372,19 @@ int mathed_char_width(LyXFont const & font, unsigned char c)
}
void mathed_string_dim(LyXFont const & font,
string const & s, int & asc, int & des, int & wid)
{
}
void mathed_string_dim(LyXFont const & font, string const & s, Dimension & dim)
{
#if 1
dim.a = 0;
dim.d = 0;
for (string::const_iterator it = s.begin(); it != s.end(); ++it) {
dim.a = max(dim.a, font_metrics::ascent(*it, font));
dim.d = max(dim.d, font_metrics::descent(*it, font));
}
#else
dim.a = font_metrics::maxAscent(font);
dim.d = font_metrics::maxDescent(font);
#endif
dim.w = font_metrics::width(s, font);
}
@ -396,25 +395,6 @@ int mathed_string_width(LyXFont const & font, string const & s)
}
int mathed_string_ascent(LyXFont const & font, string const & s)
{
int asc = 0;
for (string::const_iterator it = s.begin(); it != s.end(); ++it)
asc = max(asc, font_metrics::ascent(*it, font));
return asc;
}
int mathed_string_descent(LyXFont const & font, string const & s)
{
int des = 0;
for (string::const_iterator it = s.begin(); it != s.end(); ++it)
des = max(des, font_metrics::descent(*it, font));
return des;
}
void mathed_draw_deco(MathPainterInfo & pi, int x, int y, int w, int h,
const string & name)
{

View File

@ -6,9 +6,6 @@
#include "LString.h"
class MathPainterInfo;
class TextPainter;
class latexkeys;
class MathMetricsInfo;
class MathInset;
class LyXFont;
class Dimension;
@ -18,22 +15,19 @@ int mathed_char_width(LyXFont const &, unsigned char c);
int mathed_char_ascent(LyXFont const &, unsigned char c);
int mathed_char_descent(LyXFont const &, unsigned char c);
void mathed_draw_deco(MathPainterInfo & pain, int x, int y, int w, int h,
void mathed_draw_deco(MathPainterInfo & pi, int x, int y, int w, int h,
string const & name);
void mathed_draw_framebox(MathPainterInfo & pain, int x, int y, MathInset const *);
void mathed_draw_framebox(MathPainterInfo & pi, int x, int y, MathInset const *);
void mathed_string_dim(LyXFont const & font, string const & s, Dimension & dim);
int mathed_string_width(LyXFont const &, string const & s);
int mathed_string_ascent(LyXFont const &, string const & s);
int mathed_string_descent(LyXFont const &, string const & s);
void drawStr(MathPainterInfo & pain,
void drawStr(MathPainterInfo & pi,
LyXFont const &, int x, int y, string const & s);
void drawStrRed(MathPainterInfo & pain, int x, int y, string const & s);
void drawStrBlack(MathPainterInfo & pain, int x, int y, string const & s);
void drawChar(MathPainterInfo & pain,
LyXFont const & font, int x, int y, char c);
void drawStrRed(MathPainterInfo & pi, int x, int y, string const & s);
void drawStrBlack(MathPainterInfo & pi, int x, int y, string const & s);
void drawChar(MathPainterInfo & pi, LyXFont const & font, int x, int y, char c);
void math_font_max_dim(LyXFont const &, int & asc, int & desc);