diff options
Diffstat (limited to 'src/gui/painting/qpaintengine.cpp')
-rw-r--r-- | src/gui/painting/qpaintengine.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/gui/painting/qpaintengine.cpp b/src/gui/painting/qpaintengine.cpp index 993757b..525959b 100644 --- a/src/gui/painting/qpaintengine.cpp +++ b/src/gui/painting/qpaintengine.cpp @@ -49,6 +49,7 @@ #include <private/qtextengine_p.h> #include <qvarlengtharray.h> #include <private/qfontengine_p.h> +#include <private/qpaintengineex_p.h> QT_BEGIN_NAMESPACE @@ -144,7 +145,7 @@ QFont QTextItem::font() const /*! \class QPaintEngine - \ingroup multimedia + \ingroup painting \brief The QPaintEngine class provides an abstract definition of how QPainter draws to a given device on a given platform. @@ -302,6 +303,9 @@ void QPaintEngine::syncState() { Q_ASSERT(state); updateState(*state); + + if (isExtended()) + static_cast<QPaintEngineEx *>(this)->sync(); } static QPaintEngine *qt_polygon_recursion = 0; @@ -713,7 +717,6 @@ QPaintEngine::QPaintEngine(QPaintEnginePrivate &dptr, PaintEngineFeatures caps) */ QPaintEngine::~QPaintEngine() { - delete d_ptr; } /*! @@ -1004,8 +1007,7 @@ void QPaintEnginePrivate::drawBoxTextItem(const QPointF &p, const QTextItemInt & const int size = qRound(ti.fontEngine->ascent()); QVarLengthArray<QFixedPoint> positions; QVarLengthArray<glyph_t> glyphs; - QTransform matrix; - matrix.translate(p.x(), p.y() - size); + QTransform matrix = QTransform::fromTranslate(p.x(), p.y() - size); ti.fontEngine->getGlyphPositions(ti.glyphs, matrix, ti.flags, glyphs, positions); if (glyphs.size() == 0) return; |