]> git.lyx.org Git - lyx.git/blob - src/mathed/math_diminset.C
use a single function dimension() instead of three.
[lyx.git] / src / mathed / math_diminset.C
1 #include "math_diminset.h"
2 #include "Lsstream.h"
3 #include "textpainter.h"
4
5
6 void MathDimInset::dimensions(int & w, int & a, int & d) const
7 {
8         w = width_;
9         a = ascent_;
10         d = descent_;
11 }
12
13
14 void MathDimInset::metricsT(TextMetricsInfo const &) const
15 {
16         std::ostringstream os;
17         os << *this;
18         width_   = int(os.str().size());
19         ascent_  =      1;
20         descent_ = 0;
21 }
22
23
24 void MathDimInset::drawT(TextPainter & pain, int x, int y) const
25 {
26         std::ostringstream os;
27         os << *this;
28         pain.draw(x, y, os.str().c_str());
29 }