Diffstat (limited to 'noncore/styles/theme/ogfxeffect.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/styles/theme/ogfxeffect.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/noncore/styles/theme/ogfxeffect.cpp b/noncore/styles/theme/ogfxeffect.cpp index 90b45fe..ab63c98 100644 --- a/noncore/styles/theme/ogfxeffect.cpp +++ b/noncore/styles/theme/ogfxeffect.cpp | |||
@@ -4,19 +4,23 @@ | |||
4 | (C) 1998, 1999 Dirk A. Mueller <mueller@kde.org> | 4 | (C) 1998, 1999 Dirk A. Mueller <mueller@kde.org> |
5 | 5 | ||
6 | */ | 6 | */ |
7 | 7 | ||
8 | // $Id$ | 8 | // $Id$ |
9 | 9 | ||
10 | #include <qimage.h> | 10 | #include "ogfxeffect.h" |
11 | #include <qpainter.h> | ||
12 | 11 | ||
12 | /* OPIE */ | ||
13 | #include <opie2/odebug.h> | ||
13 | #include <qpe/qmath.h> | 14 | #include <qpe/qmath.h> |
14 | 15 | ||
15 | #include "ogfxeffect.h" | 16 | /* QT */ |
17 | #include <qimage.h> | ||
18 | #include <qpainter.h> | ||
16 | 19 | ||
20 | /* STD */ | ||
17 | #include <cstdlib> | 21 | #include <cstdlib> |
18 | #include <cmath> | 22 | #include <cmath> |
19 | 23 | ||
20 | //====================================================================== | 24 | //====================================================================== |
21 | // | 25 | // |
22 | // Gradient effects | 26 | // Gradient effects |
@@ -40,13 +44,13 @@ QImage OGfxEffect::gradient(const QSize &size, const QColor &ca, | |||
40 | int rDiff, gDiff, bDiff; | 44 | int rDiff, gDiff, bDiff; |
41 | int rca, gca, bca, rcb, gcb, bcb; | 45 | int rca, gca, bca, rcb, gcb, bcb; |
42 | 46 | ||
43 | QImage image(size, 32); | 47 | QImage image(size, 32); |
44 | 48 | ||
45 | if (size.width() == 0 || size.height() == 0) { | 49 | if (size.width() == 0 || size.height() == 0) { |
46 | qDebug ( "WARNING: OGfxEffect::gradient: invalid image" ); | 50 | odebug << "WARNING: OGfxEffect::gradient: invalid image" << oendl; |
47 | return image; | 51 | return image; |
48 | } | 52 | } |
49 | 53 | ||
50 | register int x, y; | 54 | register int x, y; |
51 | 55 | ||
52 | rDiff = (rcb = cb.red()) - (rca = ca.red()); | 56 | rDiff = (rcb = cb.red()) - (rca = ca.red()); |
@@ -296,13 +300,13 @@ QPixmap& OGfxEffect::blend(QPixmap &pixmap, float initial_intensity, | |||
296 | 300 | ||
297 | QImage& OGfxEffect::blend(QImage &image, float initial_intensity, | 301 | QImage& OGfxEffect::blend(QImage &image, float initial_intensity, |
298 | const QColor &bgnd, GradientType eff, | 302 | const QColor &bgnd, GradientType eff, |
299 | bool anti_dir) | 303 | bool anti_dir) |
300 | { | 304 | { |
301 | if (image.width() == 0 || image.height() == 0) { | 305 | if (image.width() == 0 || image.height() == 0) { |
302 | qDebug ( "Invalid image\n" ); | 306 | odebug << "Invalid image" << oendl; |
303 | return image; | 307 | return image; |
304 | } | 308 | } |
305 | 309 | ||
306 | int r_bgnd = bgnd.red(), g_bgnd = bgnd.green(), b_bgnd = bgnd.blue(); | 310 | int r_bgnd = bgnd.red(), g_bgnd = bgnd.green(), b_bgnd = bgnd.blue(); |
307 | int r, g, b; | 311 | int r, g, b; |
308 | int ind; | 312 | int ind; |
@@ -482,13 +486,13 @@ QImage& OGfxEffect::blend(QImage &image, float initial_intensity, | |||
482 | data[ind] = qRgba(r, g, b, a); | 486 | data[ind] = qRgba(r, g, b, a); |
483 | } | 487 | } |
484 | } | 488 | } |
485 | } | 489 | } |
486 | 490 | ||
487 | else | 491 | else |
488 | qDebug ( "not implemented\n" ); | 492 | odebug << "not implemented" << oendl; |
489 | 493 | ||
490 | return image; | 494 | return image; |
491 | } | 495 | } |
492 | 496 | ||
493 | #if 0 | 497 | #if 0 |
494 | // Not very efficient as we create a third big image... | 498 | // Not very efficient as we create a third big image... |