mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-11 13:46:43 +00:00
858355fb69
(lots of subsequent changes) - ascii art drawing for \frac and \sqrt git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3780 a592a061-630c-0410-9148-cb99ea01b6c8
23 lines
385 B
C
23 lines
385 B
C
|
|
#include "math_diminset.h"
|
|
#include "Lsstream.h"
|
|
#include "textpainter.h"
|
|
|
|
|
|
void MathDimInset::metrics(TextMetricsInfo const &) const
|
|
{
|
|
std::ostringstream os;
|
|
os << *this;
|
|
width_ = int(os.str().size());
|
|
ascent_ = 1;
|
|
descent_ = 0;
|
|
}
|
|
|
|
|
|
void MathDimInset::draw(TextPainter & pain, int x, int y) const
|
|
{
|
|
std::ostringstream os;
|
|
os << *this;
|
|
pain.draw(x, y, os.str().c_str());
|
|
}
|