]> git.lyx.org Git - lyx.git/blob - src/dimension.C
the ascent/descent/width -> dimensions() change
[lyx.git] / src / 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
14 #include "dimension.h"
15 #include "frontends/font_metrics.h"
16
17
18 void Dimension::operator+=(Dimension const & dim)
19 {
20         if (a < dim.a)
21                 a = dim.a;
22         if (d < dim.d)
23                 d = dim.d;
24         w += dim.w;
25 }
26
27
28 void Dimension::clear(LyXFont const & font)
29 {
30         a = font_metrics::maxAscent(font);
31         d = font_metrics::maxDescent(font);
32         w = 0;
33 }