summaryrefslogtreecommitdiffstats
path: root/src/opengl
diff options
context:
space:
mode:
authorJiang Jiang <jiang.jiang@nokia.com>2011-03-07 13:35:46 (GMT)
committerJiang Jiang <jiang.jiang@nokia.com>2011-03-11 11:25:18 (GMT)
commit6f5553b95c4df489e0bf047399a90e9a564314e6 (patch)
tree5ea933e333108237012fe64f1e6244e5aa6a064d /src/opengl
parent86e7893c2c1a4c316a1db510ab6abeafa7267c3d (diff)
downloadQt-6f5553b95c4df489e0bf047399a90e9a564314e6.zip
Qt-6f5553b95c4df489e0bf047399a90e9a564314e6.tar.gz
Qt-6f5553b95c4df489e0bf047399a90e9a564314e6.tar.bz2
Fix static text item positioning GL2 paint engine
Reviewed-by: Eskil
Diffstat (limited to 'src/opengl')
-rw-r--r--src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
index bbb75bc..fa38b5d 100644
--- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
+++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
@@ -1623,8 +1623,8 @@ void QGL2PaintEngineExPrivate::drawCachedGlyphs(QFontEngineGlyphCache::Type glyp
if (c.isNull())
continue;
- int x = staticTextItem->glyphPositions[i].x.toInt() + c.baseLineX - margin;
- int y = staticTextItem->glyphPositions[i].y.toInt() - c.baseLineY - margin;
+ int x = qFloor(staticTextItem->glyphPositions[i].x) + c.baseLineX - margin;
+ int y = qFloor(staticTextItem->glyphPositions[i].y) - c.baseLineY - margin;
vertexCoordinates->addQuad(QRectF(x, y, c.w, c.h));
textureCoordinates->addQuad(QRectF(c.x*dx, c.y*dy, c.w * dx, c.h * dy));