MathScriptInset const * q = (it + 1 == end()) ? 0 : asScript(it);
if (q) {
q->metrics(p, mi);
- ascent_ = std::max(ascent_, q->ascent(p));
- descent_ = std::max(descent_, q->descent(p));
- width_ += q->width(p);
+ ascent_ = std::max(ascent_, q->ascent2(p));
+ descent_ = std::max(descent_, q->descent2(p));
+ width_ += q->width2(p);
++it;
} else {
p->metrics(mi);
MathScriptInset const * q = (it + 1 == end()) ? 0 : asScript(it);
if (q) {
q->draw(p, pain, x, y);
- x += q->width(p);
+ x += q->width2(p);
++it;
} else {
p->draw(pain, x, y);
if (q) {
++it;
if (it < target)
- x += q->width(p);
+ x += q->width2(p);
else // "half" position
x += q->dxx(p) + q->nwid(p);
} else
if (it + 1 != end())
q = asScript(it);
if (q) {
- wid = q->width(p);
+ wid = q->width2(p);
++it;
} else
wid = p->width();
}
-bool MathXArray::covers(int x, int y) const
-{
- int const x0 = xo_;
- int const y0 = yo_ - ascent_;
- int const x1 = xo_ + width_;
- int const y1 = yo_ + descent_;
- return x >= x0 && x <= x1 && y >= y0 && y <= y1;
-}
-
-
void MathXArray::boundingBox(int & x1, int & x2, int & y1, int & y2)
{
x1 = xo_;