2002-09-11 18:36:00 +00:00
|
|
|
/**
|
2007-04-26 04:41:58 +00:00
|
|
|
* \file Dimension.cpp
|
2002-09-11 18:36:00 +00:00
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
* Licence details can be found in the file COPYING.
|
|
|
|
*
|
2008-11-14 15:58:50 +00:00
|
|
|
* \author André Pönitz
|
2002-09-11 18:36:00 +00:00
|
|
|
*
|
2003-08-23 00:17:00 +00:00
|
|
|
* Full author contact details are available in file CREDITS.
|
2002-09-11 18:36:00 +00:00
|
|
|
*/
|
|
|
|
|
2002-07-16 18:22:45 +00:00
|
|
|
#include <config.h>
|
|
|
|
|
2007-04-26 04:41:58 +00:00
|
|
|
#include "Dimension.h"
|
2002-07-09 08:44:30 +00:00
|
|
|
|
2014-05-19 20:07:04 +00:00
|
|
|
#include "support/lassert.h"
|
|
|
|
|
2006-10-21 00:16:43 +00:00
|
|
|
namespace lyx {
|
|
|
|
|
2002-07-09 08:44:30 +00:00
|
|
|
void Dimension::operator+=(Dimension const & dim)
|
|
|
|
{
|
2003-05-27 13:55:03 +00:00
|
|
|
if (asc < dim.asc)
|
|
|
|
asc = dim.asc;
|
|
|
|
if (des < dim.des)
|
|
|
|
des = dim.des;
|
|
|
|
wid += dim.wid;
|
2002-07-09 08:44:30 +00:00
|
|
|
}
|
2002-07-16 18:22:45 +00:00
|
|
|
|
2014-05-19 20:07:04 +00:00
|
|
|
|
|
|
|
Point::Point(int x, int y) : x_(x), y_(y)
|
|
|
|
{
|
2015-10-10 19:38:17 +00:00
|
|
|
LASSERT(x > -1000000, x_ = -1000000);
|
|
|
|
LASSERT(x < 1000000, x_ = 1000000);
|
|
|
|
LASSERT(y > -1000000, y_ = -1000000);
|
|
|
|
LASSERT(y < 1000000, y_ = 1000000);
|
2014-05-19 20:07:04 +00:00
|
|
|
}
|
|
|
|
|
2006-10-21 00:16:43 +00:00
|
|
|
} // namespace lyx
|