Ignore:
Timestamp:
Feb 11, 2010, 11:19:06 PM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.6.1 sources.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/gui/text/qtextengine_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information ([email protected])
     4** All rights reserved.
     5** Contact: Nokia Corporation ([email protected])
    56**
    67** This file is part of the QtGui module of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you
     37** @nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    111111
    112112    glyph_metrics_t transformed(const QTransform &xform) const;
     113
    113114};
    114115Q_DECLARE_TYPEINFO(glyph_metrics_t, Q_PRIMITIVE_TYPE);
     
    345346    inline QScriptItem()
    346347        : position(0),
    347           num_glyphs(0), descent(-1), ascent(-1), width(-1),
     348          num_glyphs(0), descent(-1), ascent(-1), width(-1),
    348349          glyph_data_offset(0) {}
    349350    inline QScriptItem(int p, const QScriptAnalysis &a)
    350351        : position(p), analysis(a),
    351           num_glyphs(0), descent(-1), ascent(-1), width(-1),
     352          num_glyphs(0), descent(-1), ascent(-1), width(-1),
    352353          glyph_data_offset(0) {}
    353354
     
    357358    QFixed descent;
    358359    QFixed ascent;
     360
    359361    QFixed width;
    360362    int glyph_data_offset;
     
    373375        : from(0), length(0),
    374376        justified(0), gridfitted(0),
    375         hasTrailingSpaces(0) {}
     377        hasTrailingSpaces(0) {}
    376378    QFixed descent;
    377379    QFixed ascent;
     380
    378381    QFixed x;
    379382    QFixed y;
     
    385388    mutable uint gridfitted : 1;
    386389    uint hasTrailingSpaces : 1;
    387     QFixed height() const { return ascent + descent + 1; }
     390    uint leadingIncluded : 1;
     391    QFixed height() const { return ascent + descent + 1
     392                            + (leadingIncluded?  qMax(QFixed(),leading) : QFixed()); }
     393    QFixed base() const { return ascent
     394                          + (leadingIncluded ? qMax(QFixed(),leading) : QFixed()); }
    388395    void setDefaultHeight(QTextEngine *eng);
    389396    void operator+=(const QScriptLine &other);
     
    394401inline void QScriptLine::operator+=(const QScriptLine &other)
    395402{
     403
    396404    descent = qMax(descent, other.descent);
    397405    ascent = qMax(ascent, other.ascent);
     
    476484    }
    477485
    478     QFontEngine *fontEngine(const QScriptItem &si, QFixed *ascent = 0, QFixed *descent = 0) const;
     486    QFontEngine *fontEngine(const QScriptItem &si, QFixed *ascent = 0, QFixed *descent = 0) const;
    479487    QFont font(const QScriptItem &si) const;
    480488    inline QFont font() const { return fnt; }
     
    582590    void shapeText(int item) const;
    583591    void shapeTextWithHarfbuzz(int item) const;
    584 #if defined(Q_OS_WINCE)
     592#if defined(Q_S_WINCE)
    585593    void shapeTextWithCE(int item) const;
    586594#endif
Note: See TracChangeset for help on using the changeset viewer.