]> git.lyx.org Git - lyx.git/blob - src/mathed/InsetMathDim.C
Real fix for bug 1395 by Stefan Schimanski, this commit replace the one done at revis...
[lyx.git] / src / mathed / InsetMathDim.C
1 /**
2  * \file InsetMathDim.C
3  * This file is part of LyX, the document processor.
4  * Licence details can be found in the file COPYING.
5  *
6  * \author André Pönitz
7  *
8  * Full author contact details are available in file CREDITS.
9  */
10
11 #include <config.h>
12
13 #include "InsetMathDim.h"
14
15 #include "BufferView.h"
16 #include "coordcache.h"
17 #include "debug.h"
18 #include "metricsinfo.h"
19
20
21 namespace lyx {
22
23
24 InsetMathDim::InsetMathDim()
25 {}
26
27
28 int InsetMathDim::ascent() const
29 {
30         return dim_.asc;
31 }
32
33
34 int InsetMathDim::descent() const
35 {
36         return dim_.des;
37 }
38
39
40 int InsetMathDim::width() const
41 {
42         return dim_.wid;
43 }
44
45
46 void InsetMathDim::setPosCache(PainterInfo const & pi, int x, int y) const
47 {
48         //lyxerr << "InsetMathDim: cache to " << x << " " << y << std::endl;
49         pi.base.bv->coordCache().insets().add(this, x, y);
50 }
51
52
53 } // namespace lyx