1 #include "math_bigopinset.h"
3 #include "mathed/support.h"
4 #include "support/LOstream.h"
9 MathBigopInset::MathBigopInset(string const & name, int id)
10 : MathInset(0, name), sym_(id)
14 MathInset * MathBigopInset::clone() const
16 return new MathBigopInset(*this);
20 void MathBigopInset::write(ostream & os, bool /* fragile */) const
22 //bool f = sym_ != LM_int && sym_ != LM_oint && size() == LM_ST_DISPLAY;
27 void MathBigopInset::writeNormal(ostream & os) const
29 os << "[bigop " << name() << "] ";
33 void MathBigopInset::metrics(MathStyles st)
35 //cerr << "\nBigopDraw\n";
38 if (sym_ < 256 || sym_ == LM_oint) {
40 ssym_ += (sym_ == LM_oint) ? LM_int : sym_;
47 mathed_string_dim(code_, size(), ssym_, ascent_, descent_, width_);
53 void MathBigopInset::draw(Painter & pain, int x, int y)
58 drawStr(pain, code_, size_, x, y, ssym_);
60 if (sym_ == LM_oint) {
62 int yy = y - (ascent_ - descent_) / 2;
63 pain.arc(xx, yy, width_, width_, 0, 360 * 64, LColor::mathline);