summaryrefslogtreecommitdiff
path: root/rotord/cvimage.cpp
diff options
context:
space:
mode:
authorTim Redfern <tim@herge.(none)>2013-07-18 11:21:47 +0100
committerTim Redfern <tim@herge.(none)>2013-07-18 11:21:47 +0100
commit0c2b109bcac035e5fd9370b78eecad7cf40793cc (patch)
tree51a7f515df9124ce3f2657260eaee7165d98c7bb /rotord/cvimage.cpp
parent9cf113df8b50c0c6f5132d3bd8b803db5332d9e6 (diff)
add xor blending
Diffstat (limited to 'rotord/cvimage.cpp')
-rw-r--r--rotord/cvimage.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/rotord/cvimage.cpp b/rotord/cvimage.cpp
index a82c1ec..c18c585 100644
--- a/rotord/cvimage.cpp
+++ b/rotord/cvimage.cpp
@@ -26,6 +26,15 @@ namespace Rotor {
}
return *this;
}
+ Image & Image::operator^=(const Image &other) {
+ if (other.w!=w||other.h!=h) {
+ cerr<<"Rotor: cannot add images with different sizes! (wanted "<<w<<"x"<<h<<", got "<<other.w<<"x"<<other.h<<")"<<endl;
+ }
+ else {
+ rgb^=other.rgb;
+ }
+ return *this;
+ }
Image & Image::add_wrap(const Image &other) {
if (other.w!=w||other.h!=h) {
cerr<<"Rotor: cannot add images with different sizes! (wanted "<<w<<"x"<<h<<", got "<<other.w<<"x"<<other.h<<")"<<endl;