summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qpaintengine_raster.cpp
diff options
context:
space:
mode:
authorPaul Olav Tvete <paul.tvete@nokia.com>2010-09-13 11:49:35 (GMT)
committerPaul Olav Tvete <paul.tvete@nokia.com>2010-09-13 11:54:30 (GMT)
commit33e7ee9d1866f12a9b92fe4b5549c31e30974d8e (patch)
tree72031d16ebed89a60590ce2392803888f99369f7 /src/gui/painting/qpaintengine_raster.cpp
parent06dc8791a70329dc8e985a0eed7e434d1f762ec5 (diff)
parent8f9d38ed63a2c568596febe5ea59a55fe03d7ba9 (diff)
downloadQt-33e7ee9d1866f12a9b92fe4b5549c31e30974d8e.zip
Qt-33e7ee9d1866f12a9b92fe4b5549c31e30974d8e.tar.gz
Qt-33e7ee9d1866f12a9b92fe4b5549c31e30974d8e.tar.bz2
Merge remote branch 'lighthouse/4.7' into lighthouse-master
Conflicts: src/gui/text/text.pri src/plugins/generic/linuxinput/qlinuxinput.cpp
Diffstat (limited to 'src/gui/painting/qpaintengine_raster.cpp')
-rw-r--r--src/gui/painting/qpaintengine_raster.cpp31
1 files changed, 29 insertions, 2 deletions
diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp
index fbfac1a..4792f00 100644
--- a/src/gui/painting/qpaintengine_raster.cpp
+++ b/src/gui/painting/qpaintengine_raster.cpp
@@ -3377,9 +3377,36 @@ void QRasterPaintEngine::drawTextItem(const QPointF &p, const QTextItem &textIte
}
#endif // Q_WS_QWS
-#if (defined(Q_WS_X11) || defined(Q_WS_QWS) || defined(Q_OS_SYMBIAN) || defined(Q_WS_QPA)) && !defined(QT_NO_FREETYPE)
+#ifdef Q_WS_QPA
+ if (s->matrix.type() < QTransform::TxScale) {
-#if (defined(Q_WS_QWS) || defined(Q_WS_QPA)) && !defined(QT_NO_QWS_QPF2)
+ QVarLengthArray<QFixedPoint> positions;
+ QVarLengthArray<glyph_t> glyphs;
+ QTransform matrix = state()->transform();
+
+ qreal _x = qFloor(p.x());
+ qreal _y = qFloor(p.y());
+ matrix.translate(_x, _y);
+
+ fontEngine->getGlyphPositions(ti.glyphs, matrix, ti.flags, glyphs, positions);
+ if (glyphs.size() == 0)
+ return;
+
+ for(int i = 0; i < glyphs.size(); i++) {
+ QImage img = fontEngine->alphaMapForGlyph(glyphs[i]);
+ glyph_metrics_t metrics = fontEngine->boundingBox(glyphs[i]);
+ alphaPenBlt(img.bits(), img.bytesPerLine(), img.depth(),
+ qRound(positions[i].x + metrics.x),
+ qRound(positions[i].y + metrics.y),
+ img.width(), img.height());
+ }
+ return;
+ }
+#endif //Q_WS_QPA
+
+#if (defined(Q_WS_X11) || defined(Q_WS_QWS) || defined(Q_OS_SYMBIAN)) && !defined(QT_NO_FREETYPE)
+
+#if defined(Q_WS_QWS) && !defined(QT_NO_QWS_QPF2)
if (fontEngine->type() == QFontEngine::QPF2) {
QFontEngine *renderingEngine = static_cast<QFontEngineQPF *>(fontEngine)->renderingEngine();
if (renderingEngine)