-
Notifications
You must be signed in to change notification settings - Fork 24
Description
The following code will draw two ellipses every loop.
Expected: The first ellipse filled, the second no fill.
Got: Using q5 both ellipses will have no fill.
( With p5.js the expected behavior is shown )
It appears that q5.pop() doesn't restore a bunch of variables such as ._noFill, and ._noStroke.
The context's .fillStyle is restored properly, but is then unused;
code:
q5 = new Q5();
q5.setup = function () {
q5.createCanvas(q5.windowWidth, q5.windowHeight);
q5.fill('#000000');
};
q5.draw = function () {
q5.clear();
q5.ellipse(100, 100, 30, 30);
q5.push();
q5.noFill();
q5.ellipse(200, 100, 30, 30);
q5.pop();
};
It appears that q5.pop() doesn't restore a bunch of variables such as ._noFill, and ._noStroke.
The context's .fillStyle is restored properly, but is then unused;