7 #include "math_fboxinset.h"
8 #include "math_support.h"
9 #include "math_mathmlstream.h"
10 #include "frontends/Painter.h"
14 MathFboxInset::MathFboxInset()
19 MathInset * MathFboxInset::clone() const
21 return new MathFboxInset(*this);
25 void MathFboxInset::metrics(MathMetricsInfo & mi) const
27 MathFontSetChanger dummy(mi.base, "textnormal");
29 ascent_ = xcell(0).ascent() + 5;
30 descent_ = xcell(0).descent() + 5;
31 width_ = xcell(0).width() + 10;
35 void MathFboxInset::draw(MathPainterInfo & pi, int x, int y) const
37 MathFontSetChanger dummy(pi.base, "textnormal");
38 pi.pain.rectangle(x + 1, y - ascent() + 1, width() - 2, height() - 2,
40 xcell(0).draw(pi, x + 5, y);
44 void MathFboxInset::write(WriteStream & os) const
46 os << "\\fbox{" << cell(0) << '}';
50 void MathFboxInset::normalize(NormalStream & os) const
52 os << "[fbox " << cell(0) << ']';