Commit bd36d753337090a2878fc0ca4117e2250c5ae1b7
- Diff rendering mode:
- inline
- side by side
src/gui/painting/qdrawhelper.cpp
(4 / 0)
|   | |||
| 2408 | 2408 | else if (4 * dst <= da) | |
| 2409 | 2409 | return (dst * sa * 255 + da * (src2 - sa) * ((((16 * dst_np - 12 * 255) * dst_np + 3 * 65025) * dst_np) / 65025) + temp) / 65025; | |
| 2410 | 2410 | else { | |
| 2411 | # ifdef Q_CC_RVCT // needed to avoid compiler crash in RVCT 2.2 | ||
| 2412 | return (dst * sa * 255 + da * (src2 - sa) * (qIntSqrtInt(dst_np * 255) - dst_np) + temp) / 65025; | ||
| 2413 | # else | ||
| 2411 | 2414 | return (dst * sa * 255 + da * (src2 - sa) * (int(sqrt(qreal(dst_np * 255))) - dst_np) + temp) / 65025; | |
| 2415 | # endif | ||
| 2412 | 2416 | } | |
| 2413 | 2417 | } | |
| 2414 | 2418 |
src/gui/painting/qmath_p.h
(6 / 0)
|   | |||
| 54 | 54 | // | |
| 55 | 55 | ||
| 56 | 56 | #include <math.h> | |
| 57 | #include <qmath.h> | ||
| 57 | 58 | ||
| 58 | 59 | QT_BEGIN_NAMESPACE | |
| 59 | 60 | ||
| 60 | 61 | static const qreal Q_PI = qreal(3.14159265358979323846); // pi | |
| 61 | 62 | static const qreal Q_2PI = qreal(6.28318530717958647693); // 2*pi | |
| 62 | 63 | static const qreal Q_PI2 = qreal(1.57079632679489661923); // pi/2 | |
| 64 | |||
| 65 | inline int qIntSqrtInt(int v) | ||
| 66 | { | ||
| 67 | return static_cast<int>(qSqrt(static_cast<qreal>(v))); | ||
| 68 | } | ||
| 63 | 69 | ||
| 64 | 70 | QT_END_NAMESPACE | |
| 65 | 71 |
Comments
Add a new comment:
Login or create an account to post a comment
Add your comment
Please log in to comment

