diff options
author | Warwick Allison <warwick.allison@nokia.com> | 2009-09-16 08:22:48 (GMT) |
---|---|---|
committer | Warwick Allison <warwick.allison@nokia.com> | 2009-09-16 08:22:48 (GMT) |
commit | 78f0dd0f00506139eab54e7dc50f8980df78da63 (patch) | |
tree | 9ec0f0256618446f4dd08be34eceb51852984074 /src/gui/painting/qpainter.cpp | |
parent | 5d35dbc3552f722cf4de220d8737e8201e4f61e5 (diff) | |
parent | 30377d51a8568b9b778b58a63fb036e35a879124 (diff) | |
download | Qt-78f0dd0f00506139eab54e7dc50f8980df78da63.zip Qt-78f0dd0f00506139eab54e7dc50f8980df78da63.tar.gz Qt-78f0dd0f00506139eab54e7dc50f8980df78da63.tar.bz2 |
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Diffstat (limited to 'src/gui/painting/qpainter.cpp')
-rw-r--r-- | src/gui/painting/qpainter.cpp | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp index 263e53e..b3aef71 100644 --- a/src/gui/painting/qpainter.cpp +++ b/src/gui/painting/qpainter.cpp @@ -1,6 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the QtGui module of the Qt Toolkit. @@ -20,10 +21,9 @@ ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** ** If you have questions regarding the use of this file, please contact ** Nokia at qt-info@nokia.com. @@ -475,7 +475,8 @@ void QPainterPrivate::draw_helper(const QPainterPath &originalPath, DrawOperatio p.end(); q->save(); - q->resetMatrix(); + state->matrix = QTransform(); + state->dirtyFlags |= QPaintEngine::DirtyTransform; updateState(state); engine->drawImage(absPathRect, image, @@ -1316,7 +1317,8 @@ void QPainterPrivate::updateState(QPainterState *newState) Another workaround is to convert the paths to polygons first and then draw the polygons instead. - \sa QPaintDevice, QPaintEngine, {QtSvg Module}, {Basic Drawing Example} + \sa QPaintDevice, QPaintEngine, {QtSvg Module}, {Basic Drawing Example}, + {Drawing Utility Functions} */ /*! @@ -1894,8 +1896,13 @@ QPaintEngine *QPainter::paintEngine() const /*! Flushes the painting pipeline and prepares for the user issuing - native painting commands. Must be followed by a call to - endNativePainting(). + commands directly to the underlying graphics context. Must be + followed by a call to endNativePainting(). + + Here is an example that shows intermixing of painter commands + and raw OpenGL commands: + + \snippet doc/src/snippets/code/src_gui_painting_qpainter.cpp 21 \sa endNativePainting() */ @@ -7556,7 +7563,6 @@ start_lengthVariant: bool hasMoreLengthVariants = false; // compatible behaviour to the old implementation. Replace // tabs by spaces - bool has_tab = false; int old_offset = offset; for (; offset < text.length(); offset++) { QChar chr = text.at(offset); @@ -7572,7 +7578,6 @@ start_lengthVariant: } else if (!tabarraylen && !tabstops) { tabstops = qRound(fm.width(QLatin1Char('x'))*8); } - has_tab = true; } else if (chr == QChar(ushort(0x9c))) { // string with multiple length variants hasMoreLengthVariants = true; |