Sorry if my question overlaps with BUG 132 (Finish Blending modes)-it wasn't clear to me.
BLEND mode seems to work differently than the other blending modes (ADD, SUBTRACT, DARKEST and LIGHTEST). This issue seems to be consistent across blend(), PImage.blend() and blendColor()].
Based on my very unscientific testing, I needed (at least) to have the alpha value of the 2nd (color/image)arg below 255 to see any changes using BLEND mode. The other modes work fine when the alpha for both colors/images is kept at 255. Here are 2 examples illustrating this.
alpha at 255
Code:
size(300, 500);
noStroke();
int [] modes = {
BLEND, ADD, SUBTRACT, DARKEST, LIGHTEST};
color c1 = color(200, 200, 0);
color c2 = color(200, 0, 200);
for (int i=0; i<5; i++){
for (int j=0; j<3; j++){
switch(j){
case 0:
fill(c1);
break;
case 1:
fill(blendColor(c1, c2, modes[i]));
break;
case 2:
fill(c2);
}
rect(100*j, 100*i, 100, 100);
}
}
Same code with alpha of 2nd arg set below 255
Code:
size(300, 500);
noStroke();
int [] modes = {
BLEND, ADD, SUBTRACT, DARKEST, LIGHTEST};
color c1 = color(200, 200, 0);
color c2 = color(200, 0, 200, 150);
for (int i=0; i<5; i++){
for (int j=0; j<3; j++){
switch(j){
case 0:
fill(c1);
break;
case 1:
fill(blendColor(c1, c2, modes[i]));
break;
case 2:
fill(c2);
}
rect(100*j, 100*i, 100, 100);
}
}