3 #include "math_dotsinset.h"
4 #include "math_mathmlstream.h"
5 #include "math_streamstr.h"
6 #include "math_support.h"
7 #include "math_parser.h"
10 MathDotsInset::MathDotsInset(latexkeys const * key)
15 MathInset * MathDotsInset::clone() const
17 return new MathDotsInset(*this);
21 void MathDotsInset::metrics(MetricsInfo & mi, Dimension & dim) const
23 mathed_char_dim(mi.base.font, 'M', dim_);
25 if (key_->name == "cdots" || key_->name == "dotsb"
26 || key_->name == "dotsm" || key_->name == "dotsi")
28 else if (key_->name == "dotsc")
30 else if (key_->name == "vdots") {
31 dim_.wid = (dim_.wid / 2) + 1;
34 else if (key_->name == "ddots")
40 void MathDotsInset::draw(PainterInfo & pain, int x, int y) const
42 mathed_draw_deco(pain, x + 2, y - dh_, dim_.width() - 2, dim_.ascent(),
44 if (key_->name == "vdots" || key_->name == "ddots")
46 if (key_->name != "vdots")
48 mathed_draw_deco(pain, x + 2, y - dh_, dim_.width() - 2, dim_.ascent(),
53 string MathDotsInset::name() const