]> git.lyx.org Git - lyx.git/blob - src/mathed/dimension.C
small up/down tweaking
[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 #ifdef __GNUG__
12 #pragma implementation
13 #endif
14
15 #include <config.h>
16 #include "dimension.h"
17 #include "math_support.h"
18
19 #include <iostream>
20
21
22 void Dimension::operator+=(Dimension const & dim)
23 {
24         if (a < dim.a)
25                 a = dim.a;
26         if (d < dim.d)
27                 d = dim.d;
28         w += dim.w;
29 }
30
31
32 std::ostream & operator<<(std::ostream & os, Dimension const & dim)
33 {
34         os << " (" << dim.w << 'x' << dim.a << '-' << dim.d << ") ";
35         return os;
36 }
37
38
39 void Dimension::clear(LyXFont const & font)
40 {
41         math_font_max_dim(font, a, d);
42         w = 0;
43 }