void setup(){
size(400,400);
background(0);
paint(200,200,150,10);
}
void draw()
{
}
void paint(float x, float y, float r, float v){
noFill();
strokeWeight(v);
stroke(250,180,0,10);
ellipse(x,y,r,r);
}
Produces:
This is not a completely black square! It’s like the yellow circle was drawn as desired, then covered with a mostly-but-not-entirely-opaque black overlay.
If I move the paint() call into draw(), then I get the expected result of a very obvious yellow circle. (PNG omitted because I’m getting “new users can only have one attachment” error.)
Why is an empty draw() changing the canvas?
ETA: p5js behaves the same way.