summaryrefslogtreecommitdiff
path: root/rotord/rotor.h
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/rotor.h
parent9cf113df8b50c0c6f5132d3bd8b803db5332d9e6 (diff)
add xor blending
Diffstat (limited to 'rotord/rotor.h')
-rwxr-xr-xrotord/rotor.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/rotord/rotor.h b/rotord/rotor.h
index 1b68f2b..293d3fa 100755
--- a/rotord/rotor.h
+++ b/rotord/rotor.h
@@ -1012,6 +1012,7 @@ namespace Rotor {
#define BLEND_alpha 4
#define BLEND_screen_wrap 5
#define BLEND_multiply_wrap 6
+ #define BLEND_xor 7
class Blend: public Image_node {
public:
Blend(){image=nullptr;};
@@ -1026,6 +1027,7 @@ namespace Rotor {
if (_mode=="alpha") mode=BLEND_alpha;
if (_mode=="screen_wrap") mode=BLEND_screen_wrap;
if (_mode=="multiply_wrap") mode=BLEND_multiply_wrap;
+ if (_mode=="xor") mode=BLEND_xor;
};
void link_params() {
for (auto p:parameter_inputs){
@@ -1049,6 +1051,9 @@ namespace Rotor {
case BLEND_multiply:
(*image)*=(*(((Image_node*)image_inputs[1]->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;