diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-03-25 10:13:32 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-03-25 10:13:32 (GMT) |
commit | 03686225036ebfc5cf78e3fcc66f5810a140c7d2 (patch) | |
tree | e35bcaf151edb27b5e48fc989c6727039c397f5b /src/gui/text/qfontengine.cpp | |
parent | 194013d9db1b3e4ba6f56a864f3b64f523202948 (diff) | |
parent | 72599ca45c416f2f0a9654412c14a148ca3d728c (diff) | |
download | Qt-03686225036ebfc5cf78e3fcc66f5810a140c7d2.zip Qt-03686225036ebfc5cf78e3fcc66f5810a140c7d2.tar.gz Qt-03686225036ebfc5cf78e3fcc66f5810a140c7d2.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-qml: (47 commits)
Optimize QML "parent" property access
Begin dragging PathView up to the level (quality and functionality) of other views.
Rename qdeclarativetime -> qmltime
Auto-test fix.
Build Fix and port to new width and height properties
Port Flickable and Flipable to support QGraphicsObject.
Protect the QDeclarativeListProperty used in QGraphicsItem with ifdef
Fix the build due to new properties in QGraphicsObject.
Remove the children property from QDeclarativeItem.
Rename qdeclarativetime -> qmltime
Update AnchorChanges to use more natural form for setting anchors.
Pen is not a creatable type.
Begin dragging PathView up to the level (quality and functionality) of other views.
Fix error reporting when symbian file copy fails.
Stabilize QGraphicsEffect test on X11
QIODevice::read() and QFile::atEnd() performance improvements
Clarified pkg_prerules usage documentation.
Updated WebKit from /home/shausman/src/webkit/trunk to qtwebkit/qtwebkit-4.6 ( aa40cdb9595eb15a68e7be03322f973aa613a8f9 )
Made it possible to define more than one language using pkg_prerules
Symbian QAudioOutput::suspend() was resetting processedUSecs() to zero
...
Diffstat (limited to 'src/gui/text/qfontengine.cpp')
-rw-r--r-- | src/gui/text/qfontengine.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/gui/text/qfontengine.cpp b/src/gui/text/qfontengine.cpp index e5975d2..194c5f3 100644 --- a/src/gui/text/qfontengine.cpp +++ b/src/gui/text/qfontengine.cpp @@ -379,6 +379,15 @@ void QFontEngine::getGlyphPositions(const QGlyphLayout &glyphs, const QTransform Q_ASSERT(positions.size() == glyphs_out.size()); } +void QFontEngine::getGlyphBearings(glyph_t glyph, qreal *leftBearing, qreal *rightBearing) +{ + glyph_metrics_t gi = boundingBox(glyph); + bool isValid = gi.isValid(); + if (leftBearing != 0) + *leftBearing = isValid ? gi.x.toReal() : 0.0; + if (rightBearing != 0) + *rightBearing = isValid ? (gi.xoff - gi.x - gi.width).toReal() : 0.0; +} glyph_metrics_t QFontEngine::tightBoundingBox(const QGlyphLayout &glyphs) { @@ -1389,6 +1398,12 @@ glyph_metrics_t QFontEngineMulti::boundingBox(const QGlyphLayout &glyphs) return overall; } +void QFontEngineMulti::getGlyphBearings(glyph_t glyph, qreal *leftBearing, qreal *rightBearing) +{ + int which = highByte(glyph); + engine(which)->getGlyphBearings(stripped(glyph), leftBearing, rightBearing); +} + void QFontEngineMulti::addOutlineToPath(qreal x, qreal y, const QGlyphLayout &glyphs, QPainterPath *path, QTextItem::RenderFlags flags) { |