summaryrefslogtreecommitdiff
path: root/rotord/cvimage.cpp
diff options
context:
space:
mode:
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;