void WatchPaintEngine::drawTextItem(const QPointF &p, const QTextItem &textItem) { TRACE(qDebug() << __func__ << p << textItem.text()); const qreal ascent = textItem.ascent(); const qreal descent = textItem.descent(); const qreal w = textItem.width(); damageRect(QRect(p.x(), p.y() - ascent, w, ascent + descent)); _painter.drawTextItem(p, textItem); }
static PyObject *meth_QTextItem_descent(PyObject *sipSelf, PyObject *sipArgs) { PyObject *sipParseErr = NULL; { QTextItem *sipCpp; if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QTextItem, &sipCpp)) { qreal sipRes; Py_BEGIN_ALLOW_THREADS sipRes = sipCpp->descent(); Py_END_ALLOW_THREADS return PyFloat_FromDouble(sipRes); } }
void QAlphaPaintEngine::drawTextItem(const QPointF &p, const QTextItem &textItem) { Q_D(QAlphaPaintEngine); QRectF tr(p.x(), p.y() - textItem.ascent(), textItem.width() + 5, textItem.ascent() + textItem.descent() + 5); tr = d->m_transform.mapRect(tr); if (d->m_pass == 0) { d->m_continueCall = false; if (d->canSeeTroughBackground(d->m_alphaPen || d->m_alphaOpacity, tr) || d->m_advancedPen) { d->addAlphaRect(tr); } d->addDirtyRect(tr); if (d->m_picengine) { d->m_picengine->drawTextItem(p, textItem); } } else { d->m_continueCall = !d->fullyContained(tr); } }