mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-25 01:26:51 +00:00
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:
parent
9b2be91bed
commit
86323de88f
@ -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)
|
void mathed_string_dim(LyXFont const & font, string const & s, Dimension & dim)
|
||||||
{
|
{
|
||||||
|
#if 1
|
||||||
dim.a = 0;
|
dim.a = 0;
|
||||||
dim.d = 0;
|
dim.d = 0;
|
||||||
for (string::const_iterator it = s.begin(); it != s.end(); ++it) {
|
for (string::const_iterator it = s.begin(); it != s.end(); ++it) {
|
||||||
dim.a = max(dim.a, font_metrics::ascent(*it, font));
|
dim.a = max(dim.a, font_metrics::ascent(*it, font));
|
||||||
dim.d = max(dim.d, font_metrics::descent(*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);
|
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,
|
void mathed_draw_deco(MathPainterInfo & pi, int x, int y, int w, int h,
|
||||||
const string & name)
|
const string & name)
|
||||||
{
|
{
|
||||||
|
@ -6,9 +6,6 @@
|
|||||||
#include "LString.h"
|
#include "LString.h"
|
||||||
|
|
||||||
class MathPainterInfo;
|
class MathPainterInfo;
|
||||||
class TextPainter;
|
|
||||||
class latexkeys;
|
|
||||||
class MathMetricsInfo;
|
|
||||||
class MathInset;
|
class MathInset;
|
||||||
class LyXFont;
|
class LyXFont;
|
||||||
class Dimension;
|
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_ascent(LyXFont const &, unsigned char c);
|
||||||
int mathed_char_descent(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);
|
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);
|
void mathed_string_dim(LyXFont const & font, string const & s, Dimension & dim);
|
||||||
int mathed_string_width(LyXFont const &, string const & s);
|
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);
|
LyXFont const &, int x, int y, string const & s);
|
||||||
void drawStrRed(MathPainterInfo & pain, int x, int y, string const & s);
|
void drawStrRed(MathPainterInfo & pi, int x, int y, string const & s);
|
||||||
void drawStrBlack(MathPainterInfo & pain, int x, int y, string const & s);
|
void drawStrBlack(MathPainterInfo & pi, int x, int y, string const & s);
|
||||||
void drawChar(MathPainterInfo & pain,
|
void drawChar(MathPainterInfo & pi, LyXFont const & font, int x, int y, char c);
|
||||||
LyXFont const & font, int x, int y, char c);
|
|
||||||
|
|
||||||
void math_font_max_dim(LyXFont const &, int & asc, int & desc);
|
void math_font_max_dim(LyXFont const &, int & asc, int & desc);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user