diff options
author | Bjoern Erik Nilsen <bjorn.nilsen@nokia.com> | 2009-04-07 14:50:23 (GMT) |
---|---|---|
committer | Bjoern Erik Nilsen <bjorn.nilsen@nokia.com> | 2009-04-08 08:24:38 (GMT) |
commit | 72f84ad17d0905f91e9d3988bb0f6482df6c6c78 (patch) | |
tree | fa1c345ee0d052db81733659f9fcdc161ede0b95 /src/gui/painting/qpainter.cpp | |
parent | 6fd4a720870775a4d9a645d9000b0259caa74178 (diff) | |
download | Qt-72f84ad17d0905f91e9d3988bb0f6482df6c6c78.zip Qt-72f84ad17d0905f91e9d3988bb0f6482df6c6c78.tar.gz Qt-72f84ad17d0905f91e9d3988bb0f6482df6c6c78.tar.bz2 |
Use qIsFuzzyNull rather than the more expensive qFuzzyCompare
See also fde7f3d03782c801901f511131458d6fcb1021a5
Reviewed-by: Olivier
Reviewed-by: Samuel
Diffstat (limited to 'src/gui/painting/qpainter.cpp')
-rw-r--r-- | src/gui/painting/qpainter.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp index 2beb8c2..d4271ae 100644 --- a/src/gui/painting/qpainter.cpp +++ b/src/gui/painting/qpainter.cpp @@ -6055,22 +6055,22 @@ void QPainter::drawTextItem(const QPointF &p, const QTextItem &_ti) const QTransform &m = d->state->matrix; if (d->state->matrix.type() < QTransform::TxShear) { bool isPlain90DegreeRotation = - (qFuzzyCompare(m.m11() + 1, qreal(1)) - && qFuzzyCompare(m.m12(), qreal(1)) - && qFuzzyCompare(m.m21(), qreal(-1)) - && qFuzzyCompare(m.m22() + 1, qreal(1)) + (qIsFuzzyNull(m.m11()) + && qIsFuzzyNull(m.m12() - qreal(1)) + && qIsFuzzyNull(m.m21() + qreal(1)) + && qIsFuzzyNull(m.m22()) ) || - (qFuzzyCompare(m.m11(), qreal(-1)) - && qFuzzyCompare(m.m12() + 1, qreal(1)) - && qFuzzyCompare(m.m21() + 1, qreal(1)) - && qFuzzyCompare(m.m22(), qreal(-1)) + (qIsFuzzyNull(m.m11() + qreal(1)) + && qIsFuzzyNull(m.m12()) + && qIsFuzzyNull(m.m21()) + && qIsFuzzyNull(m.m22() + qreal(1)) ) || - (qFuzzyCompare(m.m11() + 1, qreal(1)) - && qFuzzyCompare(m.m12(), qreal(-1)) - && qFuzzyCompare(m.m21(), qreal(1)) - && qFuzzyCompare(m.m22() + 1, qreal(1)) + (qIsFuzzyNull(m.m11()) + && qIsFuzzyNull(m.m12() + qreal(1)) + && qIsFuzzyNull(m.m21() - qreal(1)) + && qIsFuzzyNull(m.m22()) ) ; aa = !isPlain90DegreeRotation; |