Ignore:
Timestamp:
Aug 2, 2010, 9:27:30 PM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.6.3 sources from branches/vendor/nokia/qt.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/gui/text/qfontengine.cpp

    r651 r769  
    358358            }
    359359        } else {
    360             positions.resize(glyphs.numGlyphs);
    361             glyphs_out.resize(glyphs.numGlyphs);
    362             int i = 0;
    363360            while (i < glyphs.numGlyphs) {
    364361                if (!glyphs.attributes[i].dontPrint) {
     
    383380}
    384381
     382void QFontEngine::getGlyphBearings(glyph_t glyph, qreal *leftBearing, qreal *rightBearing)
     383{
     384    glyph_metrics_t gi = boundingBox(glyph);
     385    bool isValid = gi.isValid();
     386    if (leftBearing != 0)
     387        *leftBearing = isValid ? gi.x.toReal() : 0.0;
     388    if (rightBearing != 0)
     389        *rightBearing = isValid ? (gi.xoff - gi.x - gi.width).toReal() : 0.0;
     390}
    385391
    386392glyph_metrics_t QFontEngine::tightBoundingBox(const QGlyphLayout &glyphs)
     
    13891395}
    13901396
     1397void QFontEngineMulti::getGlyphBearings(glyph_t glyph, qreal *leftBearing, qreal *rightBearing)
     1398{
     1399    int which = highByte(glyph);
     1400    engine(which)->getGlyphBearings(stripped(glyph), leftBearing, rightBearing);
     1401}
     1402
    13911403void QFontEngineMulti::addOutlineToPath(qreal x, qreal y, const QGlyphLayout &glyphs,
    13921404                                        QPainterPath *path, QTextItem::RenderFlags flags)
Note: See TracChangeset for help on using the changeset viewer.