Bug 674 : problem with transparence and mask
Last modified: 2007-11-16 05:50




Status:
RESOLVED
Resolution:
INVALID -
Priority:
P2
Severity:
normal

 

Reporter:
Gids
Assigned To:
fry

Attachment Type Created Size Actions
using processing 125 image/png 2007-11-03 07:32 232.58 KB
processing 133 image/png 2007-11-03 07:33 145.68 KB
0-Msex image/jpeg 2007-11-10 10:23 31.03 KB
0-sex image/jpeg 2007-11-10 10:23 14.45 KB
1-Msex image/jpeg 2007-11-10 10:23 34.29 KB
1-sex image/jpeg 2007-11-10 10:24 19.41 KB
the program text/plain 2007-11-10 10:25 2.36 KB

Description:   Opened: 2007-11-03 07:26
i'm load somimage:
PImage i;
i=loadImage(seqName);
i.mask(loadImage(seqNameMask));

then i spread images
the core routine is

void drawSlab(int l,int x, int y ,float value,int alpha){
fill(255, 255, 255, alpha);
pushMatrix();
translate(x,y);
pushMatrix();
scale (int(3*l*(1-value)),int(3*l*(1-value)),1);
rotate (value*2.0*PI);
int leafSel= ( (int)(value *100) ) % HowManyLeaf ;

beginShape(QUADS);
texture(i);
vertex (0,0,0,0);
vertex (0,1,0,1);
vertex (1,1,1,1);
vertex (1,0,1,0);
endShape();

popMatrix();
popMatrix();
}

Using processing-125 i get the texture is transparete, accordig with the alpha value.
Using processing-133 alpha is ignored
Additional Comment #1 From Gids 2007-11-03 07:32
edit]
using processing 125
Additional Comment #2 From Gids 2007-11-03 07:33
edit]
processing 133
Additional Comment #3 From fry 2007-11-03 08:08
can you also add the images you're using as attachments to this report?
Additional Comment #4 From Gids 2007-11-03 08:13
well i attach 2 images when i postest the bug.
Did U not received?!

> can you also add the images you're using as attachments to this report?
>
>


Additional Comment #5 From fry 2007-11-03 08:21
yes, i got those--i need the seqName and seqNameMask images, so i can test
the code that you've posted. thanks!
Additional Comment #6 From Gids 2007-11-10 10:23
edit]
0-Msex
Additional Comment #7 From Gids 2007-11-10 10:23
edit]
0-sex
Additional Comment #8 From Gids 2007-11-10 10:23
edit]
1-Msex
Additional Comment #9 From Gids 2007-11-10 10:24
edit]
1-sex
Additional Comment #10 From Gids 2007-11-10 10:25
edit]
the program
Additional Comment #11 From fry 2007-11-16 05:50
use tint() instead of fill(). whenever something breaks between releases,
read revisions.txt. in this case, you'll find:

+ Fix inconsistencies between tint() and fill() with P3D and OPENGL.
From now on, tint() is always used to color images, and fill is
ignored when textures are in use. Prior, P3D ignored both fill()
and tint() settings with textures, and OPENGL used the fill color.
http://dev.processing.org/bugs/show_bug.cgi?id=222