diff options
author | Rhys Weatherley <rhys.weatherley@nokia.com> | 2009-10-25 22:04:23 (GMT) |
---|---|---|
committer | Rhys Weatherley <rhys.weatherley@nokia.com> | 2009-10-25 22:04:23 (GMT) |
commit | 48df46cd38e69fed9454d97eeaf8cf0c0489acfa (patch) | |
tree | acdfbab7c2a822f0e5c1f4cf648aede68ebd522d /src/gui/math3d/qmatrix4x4.h | |
parent | cbf6b6ee60816f44ad72f8ff550b35332d0114a6 (diff) | |
download | Qt-48df46cd38e69fed9454d97eeaf8cf0c0489acfa.zip Qt-48df46cd38e69fed9454d97eeaf8cf0c0489acfa.tar.gz Qt-48df46cd38e69fed9454d97eeaf8cf0c0489acfa.tar.bz2 |
Add an extra overload for QMatrix4x4::toTransform()
Change 100afe8d fixed a bug in QGraphicsRotation related to when
the "distance to plane" projection needed to be performed. As a
side effect it made the toTransform() API not do the expected
thing when the function is called with no argument.
This change makes the default no-argument version of toTransform()
do the simple "drop row 3 and column 3" orthographic transformation
that normal users of the class expect, and adds a new overload for
the "distance to plane" projection case for the special case.
Reviewed-by: trustme
Diffstat (limited to 'src/gui/math3d/qmatrix4x4.h')
-rw-r--r-- | src/gui/math3d/qmatrix4x4.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/math3d/qmatrix4x4.h b/src/gui/math3d/qmatrix4x4.h index b32e00a..42d992e 100644 --- a/src/gui/math3d/qmatrix4x4.h +++ b/src/gui/math3d/qmatrix4x4.h @@ -159,7 +159,8 @@ public: void toValueArray(qreal *values) const; QMatrix toAffine() const; - QTransform toTransform(qreal distanceToPlane = 1024.0f) const; + QTransform toTransform() const; + QTransform toTransform(qreal distanceToPlane) const; QPoint map(const QPoint& point) const; QPointF map(const QPointF& point) const; |