diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> | 2010-02-05 12:03:42 (GMT) |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> | 2010-02-05 12:03:42 (GMT) |
commit | 29a48b2d76b855b2f7401a25d6114339208fd4d4 (patch) | |
tree | 467556bd3dc3664a2745535753d560647436f8aa /src/opengl/gl2paintengineex | |
parent | 6d14ccae6d532a8560da05cdc85d7646ea2744e6 (diff) | |
download | Qt-29a48b2d76b855b2f7401a25d6114339208fd4d4.zip Qt-29a48b2d76b855b2f7401a25d6114339208fd4d4.tar.gz Qt-29a48b2d76b855b2f7401a25d6114339208fd4d4.tar.bz2 |
Add explanatory comment to QGL2PaintEngineExPrivate::drawCachedGlyphs
A small hack to turn off the current matrix when drawing QStaticText,
since its coordinates are already transformed.
Diffstat (limited to 'src/opengl/gl2paintengineex')
-rw-r--r-- | src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp index ed0f708..917a1a2 100644 --- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp +++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp @@ -1451,6 +1451,9 @@ void QGL2PaintEngineExPrivate::drawCachedGlyphs(QFontEngineGlyphCache::Type glyp QBrush pensBrush = q->state()->pen.brush(); setBrush(pensBrush); + // When painting a QStaticTextItem, the glyph positions are already in device coordinates, + // therefore we temporarily set an identity matrix on the painter for the draw call to + // avoid transforming the positions twice. QTransform old = s->matrix; if (includeMatrixInCache) s->matrix = QTransform(); |