summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qtransform.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Changed enum Qt::Uninitialized to enum Qt::InitializationMartin Smith2009-06-191-1/+1
| | | | | | | | | | | | enum Qt::Uninitialized contains one value, which is also called Uninitialized. Because the type and the value used the same name, wherever the type Qt::Uninitialized was used in a function signature, you had to include the enum keyword. But qdoc's preprocessor doesn't like that, so you have to take the enum keyword out of the signatures. But then the compiler complains because the type and the value look the same. So I had to change the enum type name to Initialization, so the compiler can distinguish it from the value name. And qdoc likes that too.
* Make construction of unitialized QTransform/QMatrix a no-op.Bjørn Erik Nilsen2009-06-181-0/+5
| | | | | | | | | | These constructors are useful when you have to create a temporary uninitialized QTransform/QMatrix and later initialize it to something else. Done with Lars. Reviewed-by: samuel
* Merge license header changes from 4.5Volker Hilsheimer2009-06-161-2/+2
|\
| * Update license headers as requested by the marketing department.Jason McDonald2009-06-161-2/+2
| | | | | | | | Reviewed-by: Trust Me
* | smaller optimisation in ::fromTransform() and fromScale()Lars Knoll2009-06-161-4/+6
| | | | | | | | | | | | | | We know the type of the transformation in these methods, so there is no point in setting a dirty flag for the type. Reviewed-by: Samuel
* | greatly speed up QTransform::mapRect() for projective transformsLars Knoll2009-06-161-11/+5
| | | | | | | | | | | | | | | | | | | | | | | | The code so far was converting the rect to a painterpath, mapping that one and then taking the bounding rect. It is actually sufficient to simply map the four corners of the rectangle and take the bounding rect of these four points even in the projective case. Fix the MAP macro to be more correct for degenerated projective transformations. Reviewed-By: Samuel
* | implement equality operator in a more sane wayLars Knoll2009-06-151-5/+20
| | | | | | | | | | | | | | | | | | | | | | | | Using qFuzzyCompare for checking whether two transformations are equal doesn't give us too much and is inconsistent with our other matrix classes. Using simple floating point equality is a lot faster as well. Added qFuzzyCompare overloads for QMatrix and QTransform to still allow for fuzzy comparisons. Reviewed-By: Samuel Rødal
* | QTransform::shear cut-off.Bjørn Erik Nilsen2009-06-121-0/+3
| | | | | | | | | | | | Do nothing if both sh and sv is 0. Reviewed-by: Samuel
* | Fixed bug where QTransform::type() failed to compute the correct type.Samuel Rødal2009-06-121-5/+10
| | | | | | | | | | | | | | Since QTransform::type() now uses a switch based on m_dirty, we can't treat m_dirty as a bit mask anymore. Reviewed-by: Ariya
* | Revert "greatly speed up QTransform::mapRect() for projective transforms"Andreas Aardal Hanssen2009-06-101-2/+10
| | | | | | | | | | | | | | | | | | This reverts commit 72e083c98c3adb07bb1578fb7f28f121fc3f34ac. This test broke the tst_QTransform::projectivePathMapping autotest. Lars is looking into it; for now we take the patch out. Reviewed-by: Lars
* | Revert "implement equality operator in a more sane way"Andreas Aardal Hanssen2009-06-101-9/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 07dca7a30d4bd1efd8032915700420cca3fd60fa. Move the equality operator code back in (qFuzzyCompare) to avoid breaking many autotests. The change should go back in later on, possibly supplemented by a qFuzzyCompare(QTransform) function. But until we can figure out how to not break everything this patch has to wait. Reviewed-by: Lars
* | implement equality operator in a more sane wayLars Knoll2009-06-091-5/+9
| | | | | | | | | | | | | | Using qFuzzyCompare for checking whether two transformations are equal doesn't give us too much and is inconsistent with our other matrix classes. Using simple floating point equality is a lot faster as well.
* | greatly speed up QTransform::mapRect() for projective transformsLars Knoll2009-06-091-10/+2
| | | | | | | | | | | | | | | | | | The code so far was converting the rect to a painterpath, mapping that one and then taking the bounding rect. It is actually sufficient to simply map the four corners of the rectangle and take the bounding rect of these four points even in the projective case. Reviewed-by: Andreas
* | Fixed 'crazy' warnings about using a string instead of a characterThierry Bastian2009-05-251-1/+1
| | | | | | | | | | | | | | Wherever I found that we were using a string instead of a single char I fixed the code. Reviewed-by: olivier
* | Merge commit 'origin/4.5'Olivier Goffart2009-05-181-3/+5
|\ \ | |/ | | | | | | | | | | Conflicts: src/corelib/kernel/qobject.cpp src/corelib/kernel/qobject_p.h src/network/access/qhttpnetworkconnection.cpp
| * Fixed a bug which implicitly closed perspective transformed poly lines.Trond Kjernåsen2009-05-181-3/+5
| | | | | | | | | | | | | | | | When the end point of a line in a path is clipped, only closed paths should have the closing line. Task-number: 253663 Reviewed-by: Samuel
* | Merge commit 'origin/4.5'Bjoern Erik Nilsen2009-04-291-0/+4
|\ \ | |/
| * QTransform::map(const QRegion&) cut-off for single rect regions.Bjoern Erik Nilsen2009-04-291-0/+4
| | | | | | | | | | | | Avoid QRegion<->QPainterPath conversion if possible. Reviewed-by: Samuel
| * Prevent QTransform::type() from returning TxScale instead of TxProject.Samuel Rødal2009-04-221-2/+2
| | | | | | | | | | | | | | | | We have code that assumes that m33 = 1 if the type is TxScale. Instead of changing all that code it's better to just return TxProject as type when m33 is different from 1. Reviewed-by: Simon Hausmann
* | Merge commit 'origin/4.5'Olivier Goffart2009-04-151-14/+12
|\ \ | |/ | | | | | | Conflicts: src/gui/graphicsview/qgraphicsitem.cpp
| * Fixes warning about potential use of uninitialized valueOlivier Goffart2009-04-151-14/+12
| | | | | | | | Reviewed-by: bnilsen
| * Fixes: Optimization: Important cut-offs for QTransform.Bjoern Erik Nilsen2009-04-061-3/+26
| | | | | | | | | | | | | | Task: none RevBy: Samuel AutoTest: Still pass Details: Please do not perform (potentially expensive) calculations just for fun :)
| * Fixes: Small optimization: reduce calls to QTransform::type().Bjoern Erik Nilsen2009-04-061-7/+8
| | | | | | | | | | | | | | | | | | | | Task: none RevBy: Ariya Hidayat AutoTest: Still pass. Details: QTransform::type() is cached, so only the first call to it should be expensive. However, it is not inlined so there's an overhead involved (especially when these functions are called a gazillion times).
* | Rename qIsFuzzyNull to qFuzzyIsNullBjoern Erik Nilsen2009-04-081-8/+8
| | | | | | | | | | | | | | | | | | | | The function was added in fde7f3d03782c801901f511131458d6fcb1021a5 and we believe qFuzzyIsNull is a better naming and more in line with qFuzzyCompare. Reviewed-by: Lars Knoll Reviewed-by: nrc Reviewed-by: Samuel
* | Optimise QMatrix and QTransformLars Knoll2009-04-071-59/+139
| | | | | | | | | | | | Add some private inline constructors and do inlining other places. All test still pass.
* | Merge branch '4.5' of git@scm.dev.nokia.troll.no:qt/qtSimon Hausmann2009-04-011-8/+11
|\ \ | |/ | | | | | | Conflicts: src/gui/inputmethod/qximinputcontext_x11.cpp
| * Doc: Synchronized the QTransform constructor arguments with the class ↵David Boddie2009-03-301-8/+11
| | | | | | | | | | | | | | documentation and updated a diagram. Task-number: 228201 Reviewed-by: TrustMe
| * Long live Qt 4.5!Lars Knoll2009-03-231-0/+2079
|
* Long live Qt!Lars Knoll2009-03-231-0/+2111