summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qpaintengine_raster.cpp
diff options
context:
space:
mode:
authorWater-Team <water@pad.test.qt.nokia.com>2011-06-29 21:42:03 (GMT)
committerWater-Team <water@pad.test.qt.nokia.com>2011-06-29 21:42:03 (GMT)
commit0a8daa8845325fba9cf2ec973eb6bab8a2853dd5 (patch)
tree504c698037ee6283f1b5dbc6fa658bb2bfffb99a /src/gui/painting/qpaintengine_raster.cpp
parent680023c4921019614948c277cde5498645836cb9 (diff)
parent6b3f2a3b96d01dc339d07a076300d29616603b28 (diff)
downloadQt-0a8daa8845325fba9cf2ec973eb6bab8a2853dd5.zip
Qt-0a8daa8845325fba9cf2ec973eb6bab8a2853dd5.tar.gz
Qt-0a8daa8845325fba9cf2ec973eb6bab8a2853dd5.tar.bz2
Merge branch '4.8-upstream' into master-water
Diffstat (limited to 'src/gui/painting/qpaintengine_raster.cpp')
-rw-r--r--src/gui/painting/qpaintengine_raster.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp
index 30553b5..9ba4592 100644
--- a/src/gui/painting/qpaintengine_raster.cpp
+++ b/src/gui/painting/qpaintengine_raster.cpp
@@ -2774,10 +2774,12 @@ bool QRasterPaintEngine::drawCachedGlyphs(int numGlyphs, const glyph_t *glyphs,
{
Q_D(QRasterPaintEngine);
QRasterPaintEngineState *s = state();
+ const QFixed offs = QFixed::fromReal(aliasedCoordinateDelta);
#if !defined(QT_NO_FREETYPE)
if (fontEngine->type() == QFontEngine::Freetype) {
QFontEngineFT *fe = static_cast<QFontEngineFT *>(fontEngine);
+ const QFixed xOffs = fe->supportsSubPixelPositions() ? 0 : offs;
QFontEngineFT::GlyphFormat neededFormat =
painter()->device()->devType() == QInternal::Widget
? fe->defaultGlyphFormat()
@@ -2851,8 +2853,8 @@ bool QRasterPaintEngine::drawCachedGlyphs(int numGlyphs, const glyph_t *glyphs,
};
alphaPenBlt(glyph->data, pitch, depth,
- qFloor(positions[i].x) + glyph->x,
- qFloor(positions[i].y) - glyph->y,
+ qFloor(positions[i].x + xOffs) + glyph->x,
+ qFloor(positions[i].y + offs) - glyph->y,
glyph->width, glyph->height);
}
if (lockedFace)
@@ -2892,7 +2894,6 @@ 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) {