summaryrefslogtreecommitdiff
authormickeyl <mickeyl>2003-03-30 03:12:23 (UTC)
committer mickeyl <mickeyl>2003-03-30 03:12:23 (UTC)
commit161d9299ad2448092d62a1cff16e64c1b5b3a436 (patch) (unidiff)
tree057fc5da398fc6927c9fd6a6ebafa8256fb87d02
parent8e1504c3e8b8e5af509147f0b33f4e92a7c1c041 (diff)
downloadopie-161d9299ad2448092d62a1cff16e64c1b5b3a436.zip
opie-161d9299ad2448092d62a1cff16e64c1b5b3a436.tar.gz
opie-161d9299ad2448092d62a1cff16e64c1b5b3a436.tar.bz2
remove unnecessary usage of and thus the dependency on libstdc++
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,
64 QImage image(size, 32); 64 QImage image(size, 32);
65 65
66 if (size.width() == 0 || size.height() == 0) { 66 if (size.width() == 0 || size.height() == 0) {
67#ifndef NDEBUG 67 qDebug( "WARNING: OImageEffect::gradient: invalid image" );
68 cerr << "WARNING: OImageEffect::gradient: invalid image" << endl;
69#endif
70 return image; 68 return image;
71 } 69 }
72 70
@@ -352,9 +350,7 @@ QImage OImageEffect::unbalancedGradient(const QSize &size, const QColor &ca,
352 QImage image(size, 32); 350 QImage image(size, 32);
353 351
354 if (size.width() == 0 || size.height() == 0) { 352 if (size.width() == 0 || size.height() == 0) {
355#ifndef NDEBUG 353 qDebug( "WARNING: OImageEffect::unbalancedGradient : invalid image" );
356 cerr << "WARNING: OImageEffect::unbalancedGradient : invalid image\n";
357#endif
358 return image; 354 return image;
359 } 355 }
360 356
@@ -573,9 +569,7 @@ QImage OImageEffect::unbalancedGradient(const QSize &size, const QColor &ca,
573QImage& OImageEffect::intensity(QImage &image, float percent) 569QImage& OImageEffect::intensity(QImage &image, float percent)
574{ 570{
575 if (image.width() == 0 || image.height() == 0) { 571 if (image.width() == 0 || image.height() == 0) {
576#ifndef NDEBUG 572 qDebug( "WARNING: OImageEffect::intensity : invalid image" );
577 cerr << "WARNING: OImageEffect::intensity : invalid image\n";
578#endif
579 return image; 573 return image;
580 } 574 }
581 575
@@ -640,9 +634,7 @@ QImage& OImageEffect::channelIntensity(QImage &image, float percent,
640 RGBComponent channel) 634 RGBComponent channel)
641{ 635{
642 if (image.width() == 0 || image.height() == 0) { 636 if (image.width() == 0 || image.height() == 0) {
643#ifndef NDEBUG 637 qDebug( "WARNING: OImageEffect::channelIntensity : invalid image" );
644 cerr << "WARNING: OImageEffect::channelIntensity : invalid image\n";
645#endif
646 return image; 638 return image;
647 } 639 }
648 640
@@ -732,9 +724,7 @@ QImage& OImageEffect::modulate(QImage &image, QImage &modImage, bool reverse,
732{ 724{
733 if (image.width() == 0 || image.height() == 0 || 725 if (image.width() == 0 || image.height() == 0 ||
734 modImage.width() == 0 || modImage.height() == 0) { 726 modImage.width() == 0 || modImage.height() == 0) {
735#ifndef NDEBUG 727 qDebug( "WARNING: OImageEffect::modulate : invalid image" );
736 cerr << "WARNING: OImageEffect::modulate : invalid image\n";
737#endif
738 return image; 728 return image;
739 } 729 }
740 730
@@ -863,9 +853,7 @@ QImage& OImageEffect::blend(const QColor& clr, QImage& dst, float opacity)
863 return dst; 853 return dst;
864 854
865 if (opacity < 0.0 || opacity > 1.0) { 855 if (opacity < 0.0 || opacity > 1.0) {
866#ifndef NDEBUG 856 qDebug( "WARNING: OImageEffect::blend : invalid opacity. Range [0, 1] ");
867 cerr << "WARNING: OImageEffect::blend : invalid opacity. Range [0, 1]\n";
868#endif
869 return dst; 857 return dst;
870 } 858 }
871 859
@@ -908,16 +896,12 @@ QImage& OImageEffect::blend(QImage& src, QImage& dst, float opacity)
908 return dst; 896 return dst;
909 897
910 if (src.width() != dst.width() || src.height() != dst.height()) { 898 if (src.width() != dst.width() || src.height() != dst.height()) {
911#ifndef NDEBUG 899 qDebug( "WARNING: OImageEffect::blend : src and destination images are not the same size" );
912 cerr << "WARNING: OImageEffect::blend : src and destination images are not the same size\n";
913#endif
914 return dst; 900 return dst;
915 } 901 }
916 902
917 if (opacity < 0.0 || opacity > 1.0) { 903 if (opacity < 0.0 || opacity > 1.0) {
918#ifndef NDEBUG 904 qDebug( "WARNING: OImageEffect::blend : invalid opacity. Range [0, 1]" );
919 cerr << "WARNING: OImageEffect::blend : invalid opacity. Range [0, 1]\n";
920#endif
921 return dst; 905 return dst;
922 } 906 }
923 907
@@ -957,9 +941,7 @@ QImage& OImageEffect::blend(QImage &image, float initial_intensity,
957 bool anti_dir) 941 bool anti_dir)
958{ 942{
959 if (image.width() == 0 || image.height() == 0 || image.depth()!=32 ) { 943 if (image.width() == 0 || image.height() == 0 || image.depth()!=32 ) {
960#ifndef NDEBUG 944 qDebug( "WARNING: OImageEffect::blend : invalid image" );
961 cerr << "WARNING: OImageEffect::blend : invalid image\n";
962#endif
963 return image; 945 return image;
964 } 946 }
965 947
@@ -1152,9 +1134,7 @@ QImage& OImageEffect::blend(QImage &image, float initial_intensity,
1152 } 1134 }
1153 } 1135 }
1154 } 1136 }
1155#ifndef NDEBUG 1137 else qDebug( "OImageEffect::blend effect not implemented" );
1156 else cerr << "OImageEffect::blend effect not implemented" << endl;
1157#endif
1158 return image; 1138 return image;
1159} 1139}
1160 1140
@@ -1184,9 +1164,7 @@ QImage& OImageEffect::blend(QImage &image1, QImage &image2,
1184 if (image1.width() == 0 || image1.height() == 0 || 1164 if (image1.width() == 0 || image1.height() == 0 ||
1185 image2.width() == 0 || image2.height() == 0 || 1165 image2.width() == 0 || image2.height() == 0 ||
1186 blendImage.width() == 0 || blendImage.height() == 0) { 1166 blendImage.width() == 0 || blendImage.height() == 0) {
1187#ifndef NDEBUG 1167 qDebug( "OImageEffect::blend effect invalid image" );
1188 cerr << "OImageEffect::blend effect invalid image" << endl;
1189#endif
1190 return image1; 1168 return image1;
1191 } 1169 }
1192 1170
@@ -1284,9 +1262,7 @@ unsigned int OImageEffect::uHash(unsigned int c)
1284QImage& OImageEffect::hash(QImage &image, Lighting lite, unsigned int spacing) 1262QImage& OImageEffect::hash(QImage &image, Lighting lite, unsigned int spacing)
1285{ 1263{
1286 if (image.width() == 0 || image.height() == 0) { 1264 if (image.width() == 0 || image.height() == 0) {
1287#ifndef NDEBUG 1265 qDebug( "OImageEffect::hash effect invalid image" );
1288 cerr << "OImageEffect::hash effect invalid image" << endl;
1289#endif
1290 return image; 1266 return image;
1291 } 1267 }
1292 1268
@@ -1794,9 +1770,7 @@ bool OImageEffect::blend(
1794 lower.depth() != 32 1770 lower.depth() != 32
1795 ) 1771 )
1796 { 1772 {
1797#ifndef NDEBUG 1773 qDebug( "OImageEffect::blend : Sizes not correct" );
1798 cerr << "OImageEffect::blend : Sizes not correct\n" ;
1799#endif
1800 return false; 1774 return false;
1801 } 1775 }
1802 1776