2002-03-19 16:55:58 +00:00
|
|
|
#include "math_diminset.h"
|
|
|
|
#include "Lsstream.h"
|
|
|
|
#include "textpainter.h"
|
|
|
|
|
|
|
|
|
2002-03-21 06:57:13 +00:00
|
|
|
void MathDimInset::metricsT(TextMetricsInfo const &) const
|
2002-03-19 16:55:58 +00:00
|
|
|
{
|
|
|
|
std::ostringstream os;
|
|
|
|
os << *this;
|
2002-07-11 11:27:24 +00:00
|
|
|
dim_.w = int(os.str().size());
|
|
|
|
dim_.a = 1;
|
|
|
|
dim_.d = 0;
|
2002-03-19 16:55:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2002-03-21 06:57:13 +00:00
|
|
|
void MathDimInset::drawT(TextPainter & pain, int x, int y) const
|
2002-03-19 16:55:58 +00:00
|
|
|
{
|
|
|
|
std::ostringstream os;
|
|
|
|
os << *this;
|
|
|
|
pain.draw(x, y, os.str().c_str());
|
|
|
|
}
|