summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qtransform.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix: QPainter off-by-one clipping for some non-integer scalingsEirik Aavitsland2019-10-181-2/+2
| | | | | | | | | | | | | For some scalings, setClipRect(QRect) would produce a clip one pixel different from setClipRect(QRectF) because of different rounding. Ditto for setClipRegion. Fix by making sure to transform QRectFs instead of QRects. Fixes: QTBUG-78962 Fixes: QTBUG-78963 Change-Id: I0be721133858c30769ec6d81e978962a3d6b70cf Reviewed-by: Christoph Cullmann <cullmann@kde.org> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Compile with Qt 6Lars Knoll2019-05-021-0/+8
| | | | | Change-Id: I2cd5f93d01b2a7645bf6bccede484fc301209007 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Replace Q_DECL_NOEXCEPT with noexcept in QtGuiAllan Sandfeld Jensen2019-04-051-2/+2
| | | | | Change-Id: I43803b88fea8083782d73ce157c466b022208740 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add faster path for scaling QRegion with multiple regionsJoni Poikelin2019-02-131-2/+17
| | | | | | Fixes: QTBUG-72821 Change-Id: Ic4fa349087239337a77b0e280be551b46c75af71 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* QtGui: mark some image functions as obsoleteChristian Ehrlicher2019-01-281-1/+2
| | | | | | | | | | | | | | | | Mark functions which were obsolete since Qt4 times as deprecated so they can be removed with Qt6: - QBitmap::transformed(QMatrix) - QImageIOHandler::name() - QImageWriter::setDescription() - QImageWriter::description() - QPixmap::fill() - QPixmap::grabWindow() - QPixmap::grabWidget() - QTransform::det() Change-Id: I8523065eb59a3242c4c4c195f31ae15c4dcbf8f7 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Fix the qHash implementation for QMatrix / QTransformGiuseppe D'Angelo2018-06-211-9/+9
| | | | | | | | | | | | | | | The order of the arguments of QHashCombine::operator() was accidentally swapped -- the first is supposed to be the accumlated value, the second the new value to combine. [ChangeLog][QtGui][QMatrix] The qHash() implementation for QMatrix has been changed. [ChangeLog][QtGui][QTransform] The qHash() implementation for QTransform has been changed. Change-Id: Iba13f76ff734a2184c96184ee0e5748c05db07fa Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix QTransform::transposed() result having wrong transformation typeEirik Aavitsland2018-06-061-2/+0
| | | | | | | | | | The implementation of QTransform::transposed() had a wrong assumption about the type of the result. Task-number: QTBUG-68630 Change-Id: Ia5ce794efe773d74fb5fdaff3da8cae2b452e7e5 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Replace Q_NULLPTR with nullptr where possibleKevin Funk2017-09-191-4/+4
| | | | | | | | | | | | | Remaining uses of Q_NULLPTR are in: src/corelib/global/qcompilerdetection.h (definition and documentation of Q_NULLPTR) tests/manual/qcursor/qcursorhighdpi/main.cpp (a test executable compilable both under Qt4 and Qt5) Change-Id: If6b074d91486e9b784138f4514f5c6d072acda9a Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-04-061-1/+5
|\ | | | | | | | | | | | | | | | | | | Conflicts: src/platformsupport/fontdatabases/freetype/qfontengine_ft.cpp src/platformsupport/fontdatabases/freetype/qfreetypefontdatabase.cpp src/plugins/platformthemes/gtk3/qgtk3dialoghelpers.cpp src/widgets/widgets/qtabbar.cpp Change-Id: Iaa9daee5f7a6490d56257a3824730a35751ceb05
| * GCC 7: fix -Werror=implicit-fallthroughGiuseppe D'Angelo2017-04-041-1/+5
| | | | | | | | | | | | | | | | More fallthrough-are-errors fixed. Change-Id: I9a6cb6efe988400ed3f9cb95d1e426dac317e6c4 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | QtGui: kill some unneeded relocationsMarc Mutz2017-02-241-4/+4
|/ | | | | | | | | | | | Turn arrays of pointers into arrays of arrays. Results on optimized GCC 6.1.1 Linux AMD64 builds: text -264B data -512B relocs -43 Change-Id: I0b64615913d50c286596e66675e89758ce1ec2ba Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Support C++17 fallthrough attributeAllan Sandfeld Jensen2016-08-191-6/+6
| | | | | | | | | Replaces our mix of comments for annotating intended absence of break in switches with the C++17 attribute [[fallthrough]], or its earlier a clang extension counterpart. Change-Id: I4b2d0b9b5e4425819c7f1bf01608093c536b6d14 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QtGui: use printf-style qWarning/qDebug where possible (I)Marc Mutz2016-03-041-7/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The printf-style version of QDebug expands to a lot less code than the std::ostream-style version. Of course, you pay in type safety (but compilers warn about it these days), you cannot stream complex Qt types and streaming QStrings is awkward, but in many cases you actually improve on readability. But the main reason is that something that's not supposed to be executed under normal operation has no business bloating executable code size. This is not an attempt at converting all qWarnings() to printf-style, only the low-hanging fruit. In this first part, replace qWarning() << "..."; with qWarning("..."); In QTransform shared warning strings. Saves 3KiB in text size on optimized GCC 5.3 AMD64 builds. Change-Id: I142a8020eaab043d78465178192f2c8c6d1cc4f9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* QMatrix, QTransform: restore nothrow move special membersMarc Mutz2016-02-111-1/+3
| | | | | | | | | | | | | | The user-defined copy assignment and (on QMatrix) copy constructors inhibit the move special member functions. We cannot do something about it in Qt 5, because these classes are exported (which they shouldn't be), and because making them trivially copyable might change how they are passed to functions by value, so we need to supply all the missing member functions manually. Change-Id: I59e480d7ba02cac7e3d654cb3345f541e0701f4c Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Updated license headersJani Heikkinen2016-01-151-14/+20
| | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I046ec3e47b1876cd7b4b0353a576b352e3a946d9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Use QVector::reserve() all over the place.Sérgio Martins2015-06-291-1/+3
| | | | | | | | | | | | Reduces internal memory fragmentation. The search criteria was: QVector::append(), QVector::push_back(), QVector::operator<<() and QVector::operator+=() calls inside for, do and while loops. Statements inside ifs and out of loops weren't considered. Change-Id: Ie5aaf3cdfac938994e6e5dfa5f51de501ed79a0c Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Merge remote-tracking branch 'origin/5.5' into devSimon Hausmann2015-06-031-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qnamespace.qdoc src/corelib/io/qwindowspipereader.cpp src/corelib/io/qwindowspipereader_p.h src/corelib/statemachine/qstatemachine.cpp src/corelib/statemachine/qstatemachine_p.h src/plugins/platforms/xcb/qxcbconnection.h tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp tests/auto/tools/qmake/tst_qmake.cpp tests/manual/touch/main.cpp Change-Id: I917d694890e79ee3da7d65134b5b085e23e0dd62
| * Make data tables const.Volker Krause2015-05-051-1/+1
| | | | | | | | | | | | | | | | | | | | Moves some of them to the .rodata section, the rest at least to .data.rel.ro[.local]. Change-Id: I85676ddf22b0c0097f3f0dce4c3dc018dc29d045 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* | Add qHash(QMatrix) and qHash(QTransform)Marc Mutz2015-04-211-0/+24
|/ | | | | | | | | | | QMatrix and QTransform can be compared for equality, so qHash should be overloaded, too. [ChangeLog][QtCore][QMatrix] Added qHash(QMatrix). [ChangeLog][QtCore][QTransform] Added qHash(QTransform). Change-Id: I1ce925ebe258c9d7e35b68e5ac5c3373f1460c58 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Use QDebugStateSaver to restore space setting in stream operators.Friedemann Kleint2015-03-301-1/+2
| | | | | | | | Returning dbg.space() breaks formatting on streams that already have nospace() set. Change-Id: I55e38b018679a67eb40be6b4664505483a3a7d8e Reviewed-by: David Faure <david.faure@kdab.com>
* Update copyright headersJani Heikkinen2015-02-111-7/+7
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.3' into 5.4Gabriel de Dietrich2014-09-291-0/+4
|\ | | | | | | | | | | | | | | Conflicts: src/network/socket/qnativesocketengine_unix.cpp src/widgets/kernel/qwidget_qpa.cpp Change-Id: I6f1aa320d5ca66cd92d601a95885aeaab0abb191
| * QTransform: initialize the d memberGiuseppe D'Angelo2014-09-221-0/+4
| | | | | | | | | | | | | | | | | | | | Although never used, the d member triggers all sorts of warnings when copying a QTransform around because it's technically undefined behavior (reading from an uninitialized variable). Change-Id: If06b6bea6f0ec0623c38ba330d46958b373cdc65 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | Update license headers and add new license filesMatti Paaso2014-09-241-19/+11
|/ | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* Doc: Adding mark-up to boolean default values.Jerome Pasion2013-10-081-21/+21
| | | | | | | | | | | | | | | | | Default values should have mark-up to denote that they are code. This commit changes: -"property is true" to "property is \c true". -"Returns true" to "Returns \c true". -"property is false" to "property is \c false". -"returns true" to "returns \c true". -"returns false" to "returns \c false". src/3rdparty and non-documentation instances were ignored. Task-number: QTBUG-33360 Change-Id: Ie87eaa57af947caa1230602b61c5c46292a4cf4e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Fix transform (rotation matrix) uniform scale testing.Balazs Domjan2013-09-191-5/+22
| | | | | | | | The rotation matrix is different according to the order of scale and rotate operations. The fix takes into account this. Task-number: QTBUG-31822 Change-Id: Ia1c9068e54966ec083af9c165af29caa87c510f6 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-181-1/+1
| | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-221-24/+24
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Correct QTransform::QTransform documentation re m13 initialisation.Mitch Curtis2012-08-101-1/+1
| | | | | | | | | Documentation incorrectly states that it is m13 that is set to 1, when it is instead m33. Task-number: QTBUG-10232 Change-Id: If3c7d3eb1c478ebef4f13b4842235445afc48049 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Added note to QTransform::isRotatingAli Akhtarzada2012-07-251-0/+2
| | | | | | | | | | Rotation of 180 or 360 is treated as a scaling transform Task-number: QTCREATORBUG-7651 Change-Id: I44077de0a4a90a87d2d9e8499c1920da1ed066c9 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com> Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Get started with patching up the Qt GUI docsGunnar Sletta2012-06-281-0/+1
| | | | | | | | Primary goal, make the front page of the Qt GUI module a bit more clarifying and avoid downstream references inside the Qt GUI docs. Change-Id: Icbcfbb64b93963add889bf83711daa9575885c02 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Doc: Modularize QtGui documentation.Casper van Donderen2012-05-091-7/+7
| | | | | | | | This change moves the snippets and images to the modularized directories. Change-Id: I5f86f598fbe7c47d632c613b85d94ced89ba2c29 Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
* Move QPainterPathPrivate to the private header files.Gunnar Sletta2012-04-131-0/+1
| | | | | | | | | | | | | | | | | This was made inline for the sake of performance, but has in hindsight proven to be not really worth it. It also prevents us from aligning the internal datastructure of QPainterPath with that of QPolygonF and the internal QVectorPath class which would make mapping between the two inside QPainter a lot faster. Making all this out-of-line now as discussed in the task https://bugreports.qt-project.org/browse/QTBUG-19998 so we can adress this in a binary compatible fashion during Qt 5.x Change-Id: I61058171ed31f8a845fa45517248367c85ce52cd Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Remove the usage of deprecated qdoc macros.Casper van Donderen2012-03-021-6/+6
| | | | | | | | | | | QDoc now has support for Doxygen style commands for italics, bold and list items. This change applies that change in QDoc to the actual documentation. Task-number: QTBUG-24578 Change-Id: I519bf9c29b14092e3ab6067612f42bf749eeedf5 Reviewed-by: Shane Kearns <shane.kearns@accenture.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-301-1/+1
| | | | | | | | | | As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: I311e001373776812699d6efc045b5f742890c689 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update contact information in license headers.Jason McDonald2012-01-231-1/+1
| | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I431bbbf76d7c27d8b502f87947675c116994c415 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update copyright year in license headers.Jason McDonald2012-01-051-1/+1
| | | | | Change-Id: I02f2c620296fcd91d4967d58767ea33fc4e1e7dc Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Change references to affine example.Casper van Donderen2011-06-281-2/+2
| | | | | | | | | | Because of the merge of demos and examples all references to all demos have to be updated. This is the update for the affine example. Change-Id: I83f24010162a73e11786587365c6f10b51d4bf4b Reviewed-on: http://codereview.qt.nokia.com/774 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: David Boddie
* Update licenseheader text in source files for qtbase Qt moduleJyri Tahtela2011-05-241-17/+17
| | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* Initial import from the monolithic Qt.Qt by Nokia2011-04-271-0/+2301
This is the beginning of revision history for this module. If you want to look at revision history older than this, please refer to the Qt Git wiki for how to use Git history grafting. At the time of writing, this wiki is located here: http://qt.gitorious.org/qt/pages/GitIntroductionWithQt If you have already performed the grafting and you don't see any history beyond this commit, try running "git log" with the "--follow" argument. Branched from the monolithic repo, Qt master branch, at commit 896db169ea224deb96c59ce8af800d019de63f12