diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-02-25 11:46:41 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-02-25 11:46:41 (GMT) |
commit | 8928e37c8b1b375e74c5981915c034123de11b3d (patch) | |
tree | 0dfa96087ca129f25d2e59265f73a046d75d274f /src/gui/text | |
parent | ef30a6f336d55c813423bf139d8363f50181179f (diff) | |
parent | 9e20aac8d44a0e3e3ac4c5d67376f50071987b91 (diff) | |
download | Qt-8928e37c8b1b375e74c5981915c034123de11b3d.zip Qt-8928e37c8b1b375e74c5981915c034123de11b3d.tar.gz Qt-8928e37c8b1b375e74c5981915c034123de11b3d.tar.bz2 |
Merge branch 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into master-integration
* 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-2: (54 commits)
Better check in QStaticText testcase if xformed text is supported
Fix point drawing in QPainter.
Expand indicator would not be displayed after removal of a collapsed item's child
Avoid always detaching QStaticText
Doc: fix formatting
Make the qpainter test compile under Windows.
make QtScript compatible with mingw 64
Fix QStaticText test on QWS
Add licence header
Fixed a warning.
WinCE compilation fix
Fixed hypersensitive drag on QHeaderViews
Fix seg-fault when no X11 desktop environment is present
Remove comment in drawStaticTextItem() in GL engine
Separate Phonon and gstreamer defines in qtconfig
Revert "Updated WebKit from /home/jturcott/dev/webkit to qtwebkit-4.7-merged ( 5381ceeb37d97365cfb2f037650dbb4e495bca4e )"
Revert "Updated WebKit from /home/jturcott/dev/webkit to qtwebkit-4.7-merged ( 9303f6d67fb964b71ed3e7361367c3ccfaba5e0a )"
Fix compilation on Windows
Compile with QT_USE_FAST_OPERATOR_PLUS
Fix compilation error in openVG
...
Diffstat (limited to 'src/gui/text')
-rw-r--r-- | src/gui/text/qfont.h | 1 | ||||
-rw-r--r-- | src/gui/text/qfontengine.cpp | 10 | ||||
-rw-r--r-- | src/gui/text/qfontengine_win.cpp | 6 | ||||
-rw-r--r-- | src/gui/text/qstatictext.cpp | 4 |
4 files changed, 12 insertions, 9 deletions
diff --git a/src/gui/text/qfont.h b/src/gui/text/qfont.h index a2fff70..5adf237 100644 --- a/src/gui/text/qfont.h +++ b/src/gui/text/qfont.h @@ -291,6 +291,7 @@ private: friend class QFontMetricsF; friend class QFontInfo; friend class QPainter; + friend class QPainterPrivate; friend class QPSPrintEngineFont; friend class QApplication; friend class QWidget; diff --git a/src/gui/text/qfontengine.cpp b/src/gui/text/qfontengine.cpp index c000457..e5975d2 100644 --- a/src/gui/text/qfontengine.cpp +++ b/src/gui/text/qfontengine.cpp @@ -587,8 +587,9 @@ QImage QFontEngine::alphaMapForGlyph(glyph_t glyph, const QTransform &t) { QImage i = alphaMapForGlyph(glyph); if (t.type() > QTransform::TxTranslate) - i = i.transformed(t); + i = i.transformed(t).convertToFormat(QImage::Format_Indexed8); Q_ASSERT(i.depth() <= 8); // To verify that transformed didn't change the format... + return i; } @@ -597,11 +598,14 @@ QImage QFontEngine::alphaRGBMapForGlyph(glyph_t glyph, int /* margin */, const Q QImage alphaMask = alphaMapForGlyph(glyph, t); QImage rgbMask(alphaMask.width(), alphaMask.height(), QImage::Format_RGB32); + QVector<QRgb> colorTable = alphaMask.colorTable(); for (int y=0; y<alphaMask.height(); ++y) { uint *dst = (uint *) rgbMask.scanLine(y); uchar *src = (uchar *) alphaMask.scanLine(y); - for (int x=0; x<alphaMask.width(); ++x) - dst[x] = qRgb(src[x], src[x], src[x]); + for (int x=0; x<alphaMask.width(); ++x) { + int val = qAlpha(colorTable.at(src[x])); + dst[x] = qRgb(val, val, val); + } } return rgbMask; diff --git a/src/gui/text/qfontengine_win.cpp b/src/gui/text/qfontengine_win.cpp index 1a815d3..55e93bd 100644 --- a/src/gui/text/qfontengine_win.cpp +++ b/src/gui/text/qfontengine_win.cpp @@ -208,7 +208,7 @@ void QFontEngineWin::getCMap() unitsPerEm = otm->otmEMSquare; x_height = (int)otm->otmsXHeight; loadKerningPairs(designToDevice); - _faceId.filename = QString::fromWCharArray((wchar_t *)((char *)otm + (int)otm->otmpFullName)).toLatin1(); + _faceId.filename = QString::fromWCharArray((wchar_t *)((char *)otm + (quintptr)otm->otmpFullName)).toLatin1(); lineWidth = otm->otmsUnderscoreSize; fsType = otm->otmfsType; free(otm); @@ -1006,8 +1006,8 @@ QFontEngine::Properties QFontEngineWin::properties() const Properties p; p.emSquare = unitsPerEm; p.italicAngle = otm->otmItalicAngle; - p.postscriptName = QString::fromWCharArray((wchar_t *)((char *)otm + (int)otm->otmpFamilyName)).toLatin1(); - p.postscriptName += QString::fromWCharArray((wchar_t *)((char *)otm + (int)otm->otmpStyleName)).toLatin1(); + p.postscriptName = QString::fromWCharArray((wchar_t *)((char *)otm + (quintptr)otm->otmpFamilyName)).toLatin1(); + p.postscriptName += QString::fromWCharArray((wchar_t *)((char *)otm + (quintptr)otm->otmpStyleName)).toLatin1(); #ifndef QT_NO_PRINTER p.postscriptName = QPdf::stripSpecialCharacters(p.postscriptName); #endif diff --git a/src/gui/text/qstatictext.cpp b/src/gui/text/qstatictext.cpp index a7138b9..8fe4c47 100644 --- a/src/gui/text/qstatictext.cpp +++ b/src/gui/text/qstatictext.cpp @@ -350,15 +350,13 @@ QStaticTextPrivate::QStaticTextPrivate() : items(0), itemCount(0), glyphPool(0), positionPool(0), needsClipRect(false), useBackendOptimizations(false), textFormat(Qt::AutoText) { - ref = 1; } QStaticTextPrivate::QStaticTextPrivate(const QStaticTextPrivate &other) : text(other.text), font(other.font), maximumSize(other.maximumSize), matrix(other.matrix), items(0), itemCount(0), glyphPool(0), positionPool(0), needsClipRect(false), - useBackendOptimizations(false), textFormat(other.textFormat) + useBackendOptimizations(other.useBackendOptimizations), textFormat(other.textFormat) { - ref = 1; } QStaticTextPrivate::~QStaticTextPrivate() |