From 4bfd66346630d389a5c57ed2d9bd5ace0e8b8d2f Mon Sep 17 00:00:00 2001 From: Hardmath123 Date: Sun, 24 Aug 2014 09:47:47 -0700 Subject: fix #566 --- paint.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'paint.js') diff --git a/paint.js b/paint.js index 7105b72..2e14f38 100644 --- a/paint.js +++ b/paint.js @@ -754,10 +754,11 @@ PaintCanvasMorph.prototype.floodfill = function (sourcepoint) { if (this.settings.primarycolor === "transparent") { data[currentpoint * 4 + 3] = 0; } else { + console.log(this.settings.primarycolor); data[currentpoint * 4] = this.settings.primarycolor.r; data[currentpoint * 4 + 1] = this.settings.primarycolor.g; data[currentpoint * 4 + 2] = this.settings.primarycolor.b; - data[currentpoint * 4 + 3] = this.settings.primarycolor.a; + data[currentpoint * 4 + 3] = this.settings.primarycolor.a*255; } } ctx.putImageData(img, 0, 0); -- cgit v1.3.1