]> git.lyx.org Git - lyx.git/blob - src/mathed/dimension.C
rename commandtags.h to lfuns.h and renumber/cleanup. Rebuild the tree !
[lyx.git] / src / mathed / dimension.C
1 /**
2  * \file dimension.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
12 #include <config.h>
13 #include "dimension.h"
14 #include "math_support.h"
15
16 #include <iostream>
17
18
19 void Dimension::operator+=(Dimension const & dim)
20 {
21         if (a < dim.a)
22                 a = dim.a;
23         if (d < dim.d)
24                 d = dim.d;
25         w += dim.w;
26 }
27
28
29 std::ostream & operator<<(std::ostream & os, Dimension const & dim)
30 {
31         os << " (" << dim.w << 'x' << dim.a << '-' << dim.d << ") ";
32         return os;
33 }
34
35
36 void Dimension::clear(LyXFont const & font)
37 {
38         math_font_max_dim(font, a, d);
39         w = 0;
40 }