Solved - Why does stroke alpha value in conjunction with point(x, y) cause display to be cropped?
in
Programming Questions
•
1 year ago
I am having a very strange and counter-intuitive issue, when drawing with point(x , y), if I have the stroke() attribute set to include an alpha value, like stroke(C, 100), or stroke(C,C,C,100) then all of the points are offset to the left and down... I don't understand why! This problem only seems to occur when using point, if I use rect then there is no problem...
float C;
int pX;
int pY;
void setup(){
size (500, 500);
}
void draw(){
C = (C+1)%5;
stroke(C , 200);
pX = int(random(width));
pY = int(random(height));
point(pX, pY);
}
I eventually realised I had to put smooth(); in the void setup(); section, problem solved 6 hours later :D
1