- pain.rectangle(x, y - ascent_, width_, height(), LColor::mathline);
+ mathed_char_dim(mi.base.font, 'I', dim_.a, dim_.d, dim_.w);
+ return;
+ }
+
+ dim_.clear();
+ for (const_iterator it = begin(); it != end(); ++it) {
+ MathInset const * p = it->nucleus();
+ MathScriptInset const * q = (it + 1 == end()) ? 0 : asScript(it);
+ int ww, aa, dd;
+ if (q) {
+ q->metrics(p, mi);
+ q->dimensions2(p, ww, aa, dd);
+ ++it;
+ v.push_back(Row());
+ v.back().dim = Dimension(ww, aa, dd);
+ v.push_back(Row());
+ } else {
+ p->metrics(mi);
+ p->dimensions(ww, aa, dd);
+ v.push_back(Row());
+ v.back().dim = Dimension(ww, aa, dd);
+ }
+ }
+
+ //lyxerr << "MathXArray::metrics(): '" << dim_ << "\n";
+}
+
+
+void MathXArray::draw(MathPainterInfo & pi, int x, int y) const
+{
+ //if (drawn_ && x == xo_ && y == yo_)
+ // return;
+
+ //lyxerr << "x: " << x << " y: " << y << " " << pain.workAreaHeight() << endl;
+
+ xo_ = x;
+ yo_ = y;
+ drawn_ = true;
+
+ if (y + descent() <= 0) // don't draw above the workarea
+ return;
+ if (y - ascent() >= pi.pain.paperHeight()) // don't draw below the workarea
+ return;
+ if (x + width() <= 0) // don't draw left of workarea