Ignore:
Timestamp:
May 5, 2011, 5:36:53 AM (14 years ago)
Author:
Dmitry A. Kuminov
Message:

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

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/gui/painting/qpainter.h

    r651 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
     
    7979class QMatrix;
    8080class QTransform;
     81class QStaticText;
    8182
    8283class QPainterPrivateDeleter;
     
    9899
    99100    Q_DECLARE_FLAGS(RenderHints, RenderHint)
     101
     102    class PixmapFragment {
     103    public:
     104        qreal x;
     105        qreal y;
     106        qreal sourceLeft;
     107        qreal sourceTop;
     108        qreal width;
     109        qreal height;
     110        qreal scaleX;
     111        qreal scaleY;
     112        qreal rotation;
     113        qreal opacity;
     114        static PixmapFragment Q_GUI_EXPORT create(const QPointF &pos, const QRectF &sourceRect,
     115                                            qreal scaleX = 1, qreal scaleY = 1,
     116                                            qreal rotation = 0, qreal opacity = 1);
     117    };
     118
     119    enum PixmapFragmentHint {
     120        OpaqueHint = 0x01
     121    };
     122
     123    Q_DECLARE_FLAGS(PixmapFragmentHints, PixmapFragmentHint)
    100124
    101125    QPainter();
     
    351375    inline void drawPixmap(const QRect &r, const QPixmap &pm);
    352376    inline void drawPixmap(int x, int y, int w, int h, const QPixmap &pm);
     377
     378    void drawPixmapFragments(const PixmapFragment *fragments, int fragmentCount,
     379                             const QPixmap &pixmap, PixmapFragmentHints hints = 0);
    353380
    354381    void drawImage(const QRectF &targetRect, const QImage &image, const QRectF &sourceRect,
     
    369396    void setLayoutDirection(Qt::LayoutDirection direction);
    370397    Qt::LayoutDirection layoutDirection() const;
     398
     399    void drawStaticText(const QPointF &topLeftPosition, const QStaticText &staticText);
     400    inline void drawStaticText(const QPoint &topLeftPosition, const QStaticText &staticText);
     401    inline void drawStaticText(int left, int top, const QStaticText &staticText);
    371402
    372403    void drawText(const QPointF &p, const QString &s);
     
    897928}
    898929
     930inline void QPainter::drawStaticText(const QPoint &p, const QStaticText &staticText)
     931{
     932    drawStaticText(QPointF(p), staticText);
     933}
     934
     935inline void QPainter::drawStaticText(int x, int y, const QStaticText &staticText)
     936{
     937    drawStaticText(QPointF(x, y), staticText);
     938}
     939
    899940inline void QPainter::drawTextItem(const QPoint &p, const QTextItem &ti)
    900941{
Note: See TracChangeset for help on using the changeset viewer.