Skip to content

Commit 85c3467

Browse files
committed
Processing: fix dit «du triangle noir».
1 parent a388032 commit 85c3467

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pde/microalg/microalg.pde

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ void reset() {
2727
background(#FFFFFF);
2828
strokeWeight(1);
2929
stroke(color(0, 0, 0));
30-
fill(0, 0, 0, 0);
30+
fill(1, 0, 0, 0); // 0, 0, 0, 0 n’est pas transparent (bug de Processing)
3131
turtle = new Turtle();
3232
}
3333

@@ -101,6 +101,8 @@ void interact(String data) {
101101
if (params.length == 5) {
102102
alpha = int(params[4]);
103103
}
104+
// 0, 0, 0, 0 n’est pas transparent (bug de Processing)
105+
if (alpha == 0) params[1] = "1";
104106
fill(int(params[1]), int(params[2]), int(params[3]), alpha);
105107
} else if (cmd.equals("Epaisseur")) {
106108
strokeWeight(int(params[1]));

0 commit comments

Comments
 (0)