Skip to content

Commit ae68b10

Browse files
author
Lauren McCarthy
committed
fix point color closes #2119
1 parent fb791c5 commit ae68b10

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/core/p5.Renderer2D.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -507,8 +507,11 @@ p5.Renderer2D.prototype.point = function(x, y) {
507507
} else if(this._getStroke() === styleEmpty){
508508
return this;
509509
}
510+
var s = this._getStroke();
511+
var f = this._getFill();
510512
x = Math.round(x);
511513
y = Math.round(y);
514+
this._setFill(s);
512515
if (ctx.lineWidth > 1) {
513516
ctx.beginPath();
514517
ctx.arc(
@@ -523,6 +526,7 @@ p5.Renderer2D.prototype.point = function(x, y) {
523526
} else {
524527
ctx.fillRect(x, y, 1, 1);
525528
}
529+
this._setFill(f);
526530
};
527531

528532
p5.Renderer2D.prototype.quad =

0 commit comments

Comments
 (0)