diff options
author | Jiang Jiang <jiang.jiang@nokia.com> | 2012-01-23 15:06:41 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-01-24 17:42:04 +0100 |
commit | af48e0ba36aed330e8b262687e3192d7e09796f7 (patch) | |
tree | f6d67b0c2d871ef169f61d7e0afcc578efefe5f2 /src/gui/text/qfontengine.cpp | |
parent | 601d68584921a47d83d833228f5ec698e13b624c (diff) |
Move glyphMargin() to QFontEngine
glyphMargin() support for QTextureGlyphCache is implemented in
respective font engines, thus this function is platform dependent.
Before Qt 5 the code is guarded in macros like #ifdef Q_WS_MAC,
now we should move them into QFontEngine and its subclasses.
So far only Windows font engines support it. FreeType and Core Text
based font engines all ignore it.
Change-Id: Ia14016533d8fbfaacf848a7d3bc928f8197318f5
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
Diffstat (limited to 'src/gui/text/qfontengine.cpp')
-rw-r--r-- | src/gui/text/qfontengine.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/text/qfontengine.cpp b/src/gui/text/qfontengine.cpp index 3894644f41..9303c65bac 100644 --- a/src/gui/text/qfontengine.cpp +++ b/src/gui/text/qfontengine.cpp @@ -618,7 +618,7 @@ QImage QFontEngine::alphaMapForGlyph(glyph_t glyph, QFixed subPixelPosition, con return i; } -QImage QFontEngine::alphaRGBMapForGlyph(glyph_t glyph, QFixed /*subPixelPosition*/, int /* margin */, const QTransform &t) +QImage QFontEngine::alphaRGBMapForGlyph(glyph_t glyph, QFixed /*subPixelPosition*/, const QTransform &t) { QImage alphaMask = alphaMapForGlyph(glyph, t); QImage rgbMask(alphaMask.width(), alphaMask.height(), QImage::Format_RGB32); @@ -664,7 +664,7 @@ QImage *QFontEngine::lockedAlphaMapForGlyph(glyph_t glyph, QFixed subPixelPositi if (neededFormat != Format_A32) currentlyLockedAlphaMap = alphaMapForGlyph(glyph, subPixelPosition, t); else - currentlyLockedAlphaMap = alphaRGBMapForGlyph(glyph, subPixelPosition, 0, t); + currentlyLockedAlphaMap = alphaRGBMapForGlyph(glyph, subPixelPosition, t); if (offset != 0) *offset = QPoint(0, 0); @@ -1747,11 +1747,11 @@ QImage QFontEngineMulti::alphaMapForGlyph(glyph_t glyph, QFixed subPixelPosition return engine(which)->alphaMapForGlyph(stripped(glyph), subPixelPosition, t); } -QImage QFontEngineMulti::alphaRGBMapForGlyph(glyph_t glyph, QFixed subPixelPosition, int margin, const QTransform &t) +QImage QFontEngineMulti::alphaRGBMapForGlyph(glyph_t glyph, QFixed subPixelPosition, const QTransform &t) { const int which = highByte(glyph); Q_ASSERT(which < engines.size()); - return engine(which)->alphaRGBMapForGlyph(stripped(glyph), subPixelPosition, margin, t); + return engine(which)->alphaRGBMapForGlyph(stripped(glyph), subPixelPosition, t); } QT_END_NAMESPACE |