4 #include "math_dotsinset.h"
5 #include "math_mathmlstream.h"
6 #include "math_streamstr.h"
7 #include "math_support.h"
8 #include "math_parser.h"
11 MathDotsInset::MathDotsInset(latexkeys const * key)
16 MathInset * MathDotsInset::clone() const
18 return new MathDotsInset(*this);
22 void MathDotsInset::metrics(MetricsInfo & mi) const
24 mathed_char_dim(mi.base.font, 'M', dim_);
26 if (key_->name == "cdots" || key_->name == "dotsb"
27 || key_->name == "dotsm" || key_->name == "dotsi")
29 else if (key_->name == "dotsc")
31 else if (key_->name == "vdots") {
32 dim_.w = (dim_.w / 2) + 1;
35 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_, width() - 2, ascent(), key_->name);
43 if (key_->name == "vdots" || key_->name == "ddots")
45 if (key_->name != "vdots")
47 mathed_draw_deco(pain, x + 2, y - dh_, width() - 2, ascent(), key_->name);
51 string MathDotsInset::name() const