Why is the `fill ()` processing with alpha never completely filled?

Say we have the following code:

void setup() {
    background(0);
    size(200, 200);
    fill(255);        
    rect(75, 75, 50, 50);
}  

void draw() {
    fill(0, 2);
    rect(0, 0, width, height);
}

Even after waiting β€œforever”, a white 50x50 rectangle is still displayed, although it disappears. Why fill(0, 2)doesn't it cover it?

I believe this question is twofold:

  • Why it does not disappear in black , as in why drawing another dark rectangle over white does not erase it in the end (I think that the lines are tinted windows one above the other, ultimately even the brightest light will not shine), and
  • Why doesn't it disappear in black , as in why is this behavior intended for the Processing community?
+4
source share
2 answers

, , : http://processing.org/discourse/beta/num_1138703939.html

, ints, float. ints. 63, 63, 63, , , .

, , - .

+2

, , , .

  • , , ( , ; ),
  • , , , Processing?

, ( ) , , , .

-2

Source: https://habr.com/ru/post/1531105/


All Articles