Don't transform glyph positions for Core Graphics paint engine
authorJiang Jiang <jiang.jiang@nokia.com>
Tue, 19 Apr 2011 10:48:19 +0000 (12:48 +0200)
committerJiang Jiang <jiang.jiang@nokia.com>
Fri, 29 Apr 2011 09:02:24 +0000 (11:02 +0200)
Since it already transformed text positions based on transform matrix
on QPainter.

Reviewed-by: Eskil
(cherry picked from commit b86c9120710bf1481df5f6541618169a82fd65b8)

src/gui/painting/qpainter.cpp

index 9fafba5..b7686fa 100644 (file)
@@ -156,7 +156,8 @@ static bool qt_paintengine_supports_transformations(QPaintEngine::Type type)
 {
     return type == QPaintEngine::OpenGL2
             || type == QPaintEngine::OpenVG
-            || type == QPaintEngine::OpenGL;
+            || type == QPaintEngine::OpenGL
+            || type == QPaintEngine::CoreGraphics;
 }
 
 #ifndef QT_NO_DEBUG
@@ -5809,7 +5810,7 @@ void QPainter::drawGlyphs(const QPointF &position, const QGlyphs &glyphs)
     bool paintEngineSupportsTransformations =
             d->extended != 0
             ? qt_paintengine_supports_transformations(d->extended->type())
-            : false;
+            : qt_paintengine_supports_transformations(d->engine->type());
     for (int i=0; i<count; ++i) {
         QPointF processedPosition = position + glyphPositions.at(i);
         if (!paintEngineSupportsTransformations)