summaryrefslogtreecommitdiffstats
path: root/src/opengl/gl2paintengineex
diff options
context:
space:
mode:
Diffstat (limited to 'src/opengl/gl2paintengineex')
-rw-r--r--src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
index e461dd0fd4..e049f53fac 100644
--- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
+++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
@@ -63,7 +63,6 @@
#include <qmath.h>
#include <private/qgl_p.h>
-#include <private/qmath_p.h>
#include <private/qpaintengineex_p.h>
#include <QPaintEngine>
#include <private/qpainter_p.h>
@@ -288,7 +287,7 @@ void QGL2PaintEngineExPrivate::updateBrushUniforms()
const QConicalGradient *g = static_cast<const QConicalGradient *>(currentBrush.gradient());
translationPoint = g->center();
- GLfloat angle = -(g->angle() * 2 * Q_PI) / 360.0;
+ GLfloat angle = -qDegreesToRadians(g->angle());
shaderManager->currentProgram()->setUniformValue(location(QGLEngineShaderManager::Angle), angle);
@@ -1945,8 +1944,8 @@ void QGL2PaintEngineExPrivate::drawPixmapFragments(const QPainter::PixmapFragmen
qreal s = 0;
qreal c = 1;
if (fragments[i].rotation != 0) {
- s = qFastSin(fragments[i].rotation * Q_PI / 180);
- c = qFastCos(fragments[i].rotation * Q_PI / 180);
+ s = qFastSin(qDegreesToRadians(fragments[i].rotation));
+ c = qFastCos(qDegreesToRadians(fragments[i].rotation));
}
qreal right = 0.5 * fragments[i].scaleX * fragments[i].width;