summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qpaintengine_raster.cpp
diff options
context:
space:
mode:
authorJiang Jiang <jiang.jiang@nokia.com>2011-05-24 09:50:16 (GMT)
committerJiang Jiang <jiang.jiang@nokia.com>2011-05-30 10:35:29 (GMT)
commit93bce7874721de905af0181da95c58fe13a2e015 (patch)
tree9244310abc3dd26c0555e5127a1f164accbbfbe2 /src/gui/painting/qpaintengine_raster.cpp
parent35421a9313a324ff63df6ba27e03b8090c964717 (diff)
downloadQt-93bce7874721de905af0181da95c58fe13a2e015.zip
Qt-93bce7874721de905af0181da95c58fe13a2e015.tar.gz
Qt-93bce7874721de905af0181da95c58fe13a2e015.tar.bz2
Keep line consistency with text baseline
Also revert previous underline patch. Reviewed-by: Eskil
Diffstat (limited to 'src/gui/painting/qpaintengine_raster.cpp')
-rw-r--r--src/gui/painting/qpaintengine_raster.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp
index 592bf12..730f6a2 100644
--- a/src/gui/painting/qpaintengine_raster.cpp
+++ b/src/gui/painting/qpaintengine_raster.cpp
@@ -2880,6 +2880,7 @@ bool QRasterPaintEngine::drawCachedGlyphs(int numGlyphs, const glyph_t *glyphs,
rightShift = 3; // divide by 8
int margin = cache->glyphMargin();
+ const QFixed offs = QFixed::fromReal(aliasedCoordinateDelta);
const uchar *bits = image.bits();
for (int i=0; i<numGlyphs; ++i) {
@@ -2890,7 +2891,7 @@ bool QRasterPaintEngine::drawCachedGlyphs(int numGlyphs, const glyph_t *glyphs,
continue;
int x = qFloor(positions[i].x) + c.baseLineX - margin;
- int y = qFloor(positions[i].y) - c.baseLineY - margin;
+ int y = qFloor(positions[i].y + offs) - c.baseLineY - margin;
// printf("drawing [%d %d %d %d] baseline [%d %d], glyph: %d, to: %d %d, pos: %d %d\n",
// c.x, c.y,