summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/styles/theme/ogfxeffect.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/noncore/styles/theme/ogfxeffect.cpp b/noncore/styles/theme/ogfxeffect.cpp
index a991728..55f3c1f 100644
--- a/noncore/styles/theme/ogfxeffect.cpp
+++ b/noncore/styles/theme/ogfxeffect.cpp
@@ -10,6 +10,8 @@
10#include <qimage.h> 10#include <qimage.h>
11#include <qpainter.h> 11#include <qpainter.h>
12 12
13#include <qpe/qmath.h>
14
13#include "ogfxeffect.h" 15#include "ogfxeffect.h"
14 16
15 17
@@ -21,7 +23,7 @@
21 23
22 24
23QPixmap& OGfxEffect::gradient(QPixmap &pixmap, const QColor &ca, 25QPixmap& OGfxEffect::gradient(QPixmap &pixmap, const QColor &ca,
24 const QColor &cb, GradientType eff, int ncols) 26 const QColor &cb, GradientType eff, int /*ncols*/)
25{ 27{
26 if(pixmap.depth() > 8 && 28 if(pixmap.depth() > 8 &&
27 (eff == VerticalGradient || eff == HorizontalGradient)) { 29 (eff == VerticalGradient || eff == HorizontalGradient)) {
@@ -91,13 +93,11 @@ QPixmap& OGfxEffect::gradient(QPixmap &pixmap, const QColor &ca,
91 93
92QPixmap& OGfxEffect::blend(QPixmap &pixmap, float initial_intensity, 94QPixmap& OGfxEffect::blend(QPixmap &pixmap, float initial_intensity,
93 const QColor &bgnd, GradientType eff, 95 const QColor &bgnd, GradientType eff,
94 bool anti_dir, int ncols) 96 bool anti_dir, int /*ncols*/)
95{ 97{
96 QImage image = pixmap.convertToImage(); 98 QImage image = pixmap.convertToImage();
97 OGfxEffect::blend(image, initial_intensity, bgnd, eff, anti_dir); 99 OGfxEffect::blend(image, initial_intensity, bgnd, eff, anti_dir);
98 100
99 unsigned int tmp;
100
101 if ( pixmap. depth ( ) <= 8 ) 101 if ( pixmap. depth ( ) <= 8 )
102 image. convertDepth ( pixmap. depth ( )); 102 image. convertDepth ( pixmap. depth ( ));
103 103
@@ -218,7 +218,7 @@ QImage& OGfxEffect::blend(QImage &image, float initial_intensity,
218 if (eff == RectangleGradient) 218 if (eff == RectangleGradient)
219 intensity = initial_intensity + QMAX(xvar, yvar); 219 intensity = initial_intensity + QMAX(xvar, yvar);
220 else 220 else
221 intensity = initial_intensity + sqrt(xvar * xvar + yvar * yvar); 221 intensity = initial_intensity + qSqrt(xvar * xvar + yvar * yvar);
222 if (intensity > 1) intensity = 1; 222 if (intensity > 1) intensity = 1;
223 if (intensity < 0) intensity = 0; 223 if (intensity < 0) intensity = 0;
224 224
@@ -262,7 +262,7 @@ QImage& OGfxEffect::blend(QImage &image, float initial_intensity,
262 if (eff == RectangleGradient) 262 if (eff == RectangleGradient)
263 intensity = initial_intensity + QMAX(xvar, yvar); 263 intensity = initial_intensity + QMAX(xvar, yvar);
264 else 264 else
265 intensity = initial_intensity + sqrt(xvar * xvar + yvar * yvar); 265 intensity = initial_intensity + qSqrt(xvar * xvar + yvar * yvar);
266 if (intensity > 1) intensity = 1; 266 if (intensity > 1) intensity = 1;
267 if (intensity < 0) intensity = 0; 267 if (intensity < 0) intensity = 0;
268 268