From 0c2b109bcac035e5fd9370b78eecad7cf40793cc Mon Sep 17 00:00:00 2001 From: Tim Redfern Date: Thu, 18 Jul 2013 11:21:47 +0100 Subject: add xor blending --- rotord/cvimage.cpp | 9 +++++++++ rotord/cvimage.h | 1 + rotord/rotor.h | 5 +++++ 3 files changed, 15 insertions(+) (limited to 'rotord') 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 "<connection)->get_output(frame))); break; + case BLEND_xor: + (*image)^=(*(((Image_node*)image_inputs[1]->connection)->get_output(frame))); + break; case BLEND_alpha: (*image)=(*image).alpha_blend(*(((Image_node*)image_inputs[1]->connection)->get_output(frame))); break; -- cgit v1.2.3