7 #include "math_dotsinset.h"
8 #include "math_mathmlstream.h"
9 #include "math_streamstr.h"
10 #include "math_support.h"
11 #include "math_parser.h"
14 MathDotsInset::MathDotsInset(latexkeys const * key)
19 MathInset * MathDotsInset::clone() const
21 return new MathDotsInset(*this);
25 void MathDotsInset::metrics(MathMetricsInfo & mi) const
27 mathed_char_dim(mi.base.font, 'M', dim_);
29 if (key_->name == "cdots" || key_->name == "dotsb"
30 || key_->name == "dotsm" || key_->name == "dotsi")
32 else if (key_->name == "dotsc")
34 else if (key_->name == "vdots") {
35 dim_.w = (dim_.w / 2) + 1;
38 else if (key_->name == "ddots")
43 void MathDotsInset::draw(MathPainterInfo & pain, int x, int y) const
45 mathed_draw_deco(pain, x + 2, y - dh_, width() - 2, ascent(), key_->name);
46 if (key_->name == "vdots" || key_->name == "ddots")
48 if (key_->name != "vdots")
50 mathed_draw_deco(pain, x + 2, y - dh_, width() - 2, ascent(), key_->name);
54 string MathDotsInset::name() const