summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opieui/oimageeffect.cpp76
1 files changed, 25 insertions, 51 deletions
diff --git a/libopie2/opieui/oimageeffect.cpp b/libopie2/opieui/oimageeffect.cpp
index 3c28bbe..2855da6 100644
--- a/libopie2/opieui/oimageeffect.cpp
+++ b/libopie2/opieui/oimageeffect.cpp
@@ -66,5 +66,3 @@ QImage OImageEffect::gradient(const QSize &size, const QColor &ca,
if (size.width() == 0 || size.height() == 0) {
-#ifndef NDEBUG
- cerr << "WARNING: OImageEffect::gradient: invalid image" << endl;
-#endif
+ qDebug( "WARNING: OImageEffect::gradient: invalid image" );
return image;
@@ -354,5 +352,3 @@ QImage OImageEffect::unbalancedGradient(const QSize &size, const QColor &ca,
if (size.width() == 0 || size.height() == 0) {
-#ifndef NDEBUG
- cerr << "WARNING: OImageEffect::unbalancedGradient : invalid image\n";
-#endif
+ qDebug( "WARNING: OImageEffect::unbalancedGradient : invalid image" );
return image;
@@ -575,5 +571,3 @@ QImage& OImageEffect::intensity(QImage &image, float percent)
if (image.width() == 0 || image.height() == 0) {
-#ifndef NDEBUG
- cerr << "WARNING: OImageEffect::intensity : invalid image\n";
-#endif
+ qDebug( "WARNING: OImageEffect::intensity : invalid image" );
return image;
@@ -642,5 +636,3 @@ QImage& OImageEffect::channelIntensity(QImage &image, float percent,
if (image.width() == 0 || image.height() == 0) {
-#ifndef NDEBUG
- cerr << "WARNING: OImageEffect::channelIntensity : invalid image\n";
-#endif
+ qDebug( "WARNING: OImageEffect::channelIntensity : invalid image" );
return image;
@@ -734,6 +726,4 @@ QImage& OImageEffect::modulate(QImage &image, QImage &modImage, bool reverse,
modImage.width() == 0 || modImage.height() == 0) {
-#ifndef NDEBUG
- cerr << "WARNING: OImageEffect::modulate : invalid image\n";
-#endif
- return image;
+ qDebug( "WARNING: OImageEffect::modulate : invalid image" );
+ return image;
}
@@ -862,9 +852,7 @@ QImage& OImageEffect::blend(const QColor& clr, QImage& dst, float opacity)
if (dst.width() <= 0 || dst.height() <= 0)
- return dst;
+ return dst;
if (opacity < 0.0 || opacity > 1.0) {
-#ifndef NDEBUG
- cerr << "WARNING: OImageEffect::blend : invalid opacity. Range [0, 1]\n";
-#endif
- return dst;
+ qDebug( "WARNING: OImageEffect::blend : invalid opacity. Range [0, 1] ");
+ return dst;
}
@@ -873,3 +861,3 @@ QImage& OImageEffect::blend(const QColor& clr, QImage& dst, float opacity)
if (depth != 32)
- dst = dst.convertDepth(32);
+ dst = dst.convertDepth(32);
@@ -905,11 +893,9 @@ QImage& OImageEffect::blend(QImage& src, QImage& dst, float opacity)
if (src.width() <= 0 || src.height() <= 0)
- return dst;
+ return dst;
if (dst.width() <= 0 || dst.height() <= 0)
- return dst;
+ return dst;
if (src.width() != dst.width() || src.height() != dst.height()) {
-#ifndef NDEBUG
- cerr << "WARNING: OImageEffect::blend : src and destination images are not the same size\n";
-#endif
- return dst;
+ qDebug( "WARNING: OImageEffect::blend : src and destination images are not the same size" );
+ return dst;
}
@@ -917,6 +903,4 @@ QImage& OImageEffect::blend(QImage& src, QImage& dst, float opacity)
if (opacity < 0.0 || opacity > 1.0) {
-#ifndef NDEBUG
- cerr << "WARNING: OImageEffect::blend : invalid opacity. Range [0, 1]\n";
-#endif
- return dst;
+ qDebug( "WARNING: OImageEffect::blend : invalid opacity. Range [0, 1]" );
+ return dst;
}
@@ -959,6 +943,4 @@ QImage& OImageEffect::blend(QImage &image, float initial_intensity,
if (image.width() == 0 || image.height() == 0 || image.depth()!=32 ) {
-#ifndef NDEBUG
- cerr << "WARNING: OImageEffect::blend : invalid image\n";
-#endif
- return image;
+ qDebug( "WARNING: OImageEffect::blend : invalid image" );
+ return image;
}
@@ -1154,5 +1136,3 @@ QImage& OImageEffect::blend(QImage &image, float initial_intensity,
}
-#ifndef NDEBUG
- else cerr << "OImageEffect::blend effect not implemented" << endl;
-#endif
+ else qDebug( "OImageEffect::blend effect not implemented" );
return image;
@@ -1186,6 +1166,4 @@ QImage& OImageEffect::blend(QImage &image1, QImage &image2,
blendImage.width() == 0 || blendImage.height() == 0) {
-#ifndef NDEBUG
- cerr << "OImageEffect::blend effect invalid image" << endl;
-#endif
- return image1;
+ qDebug( "OImageEffect::blend effect invalid image" );
+ return image1;
}
@@ -1286,6 +1264,4 @@ QImage& OImageEffect::hash(QImage &image, Lighting lite, unsigned int spacing)
if (image.width() == 0 || image.height() == 0) {
-#ifndef NDEBUG
- cerr << "OImageEffect::hash effect invalid image" << endl;
-#endif
- return image;
+ qDebug( "OImageEffect::hash effect invalid image" );
+ return image;
}
@@ -1796,6 +1772,4 @@ bool OImageEffect::blend(
{
-#ifndef NDEBUG
- cerr << "OImageEffect::blend : Sizes not correct\n" ;
-#endif
- return false;
+ qDebug( "OImageEffect::blend : Sizes not correct" );
+ return false;
}