summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--libopie2/opieui/oimageeffect.cpp52
1 files changed, 13 insertions, 39 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
@@ -64,9 +64,7 @@ QImage OImageEffect::gradient(const QSize &size, const QColor &ca,
QImage image(size, 32);
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;
}
@@ -352,9 +350,7 @@ QImage OImageEffect::unbalancedGradient(const QSize &size, const QColor &ca,
QImage image(size, 32);
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;
}
@@ -573,9 +569,7 @@ QImage OImageEffect::unbalancedGradient(const QSize &size, const QColor &ca,
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;
}
@@ -640,9 +634,7 @@ QImage& OImageEffect::channelIntensity(QImage &image, float percent,
RGBComponent channel)
{
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;
}
@@ -732,9 +724,7 @@ QImage& OImageEffect::modulate(QImage &image, QImage &modImage, bool reverse,
{
if (image.width() == 0 || image.height() == 0 ||
modImage.width() == 0 || modImage.height() == 0) {
-#ifndef NDEBUG
- cerr << "WARNING: OImageEffect::modulate : invalid image\n";
-#endif
+ qDebug( "WARNING: OImageEffect::modulate : invalid image" );
return image;
}
@@ -863,9 +853,7 @@ QImage& OImageEffect::blend(const QColor& clr, QImage& dst, float opacity)
return dst;
if (opacity < 0.0 || opacity > 1.0) {
-#ifndef NDEBUG
- cerr << "WARNING: OImageEffect::blend : invalid opacity. Range [0, 1]\n";
-#endif
+ qDebug( "WARNING: OImageEffect::blend : invalid opacity. Range [0, 1] ");
return dst;
}
@@ -908,16 +896,12 @@ QImage& OImageEffect::blend(QImage& src, QImage& dst, float opacity)
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
+ qDebug( "WARNING: OImageEffect::blend : src and destination images are not the same size" );
return dst;
}
if (opacity < 0.0 || opacity > 1.0) {
-#ifndef NDEBUG
- cerr << "WARNING: OImageEffect::blend : invalid opacity. Range [0, 1]\n";
-#endif
+ qDebug( "WARNING: OImageEffect::blend : invalid opacity. Range [0, 1]" );
return dst;
}
@@ -957,9 +941,7 @@ QImage& OImageEffect::blend(QImage &image, float initial_intensity,
bool anti_dir)
{
if (image.width() == 0 || image.height() == 0 || image.depth()!=32 ) {
-#ifndef NDEBUG
- cerr << "WARNING: OImageEffect::blend : invalid image\n";
-#endif
+ qDebug( "WARNING: OImageEffect::blend : invalid image" );
return image;
}
@@ -1152,9 +1134,7 @@ 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;
}
@@ -1184,9 +1164,7 @@ QImage& OImageEffect::blend(QImage &image1, QImage &image2,
if (image1.width() == 0 || image1.height() == 0 ||
image2.width() == 0 || image2.height() == 0 ||
blendImage.width() == 0 || blendImage.height() == 0) {
-#ifndef NDEBUG
- cerr << "OImageEffect::blend effect invalid image" << endl;
-#endif
+ qDebug( "OImageEffect::blend effect invalid image" );
return image1;
}
@@ -1284,9 +1262,7 @@ unsigned int OImageEffect::uHash(unsigned int c)
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
+ qDebug( "OImageEffect::hash effect invalid image" );
return image;
}
@@ -1794,9 +1770,7 @@ bool OImageEffect::blend(
lower.depth() != 32
)
{
-#ifndef NDEBUG
- cerr << "OImageEffect::blend : Sizes not correct\n" ;
-#endif
+ qDebug( "OImageEffect::blend : Sizes not correct" );
return false;
}