summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHardmath123 <hardmath123@gmail.com>2014-08-24 09:47:47 -0700
committerHardmath123 <hardmath123@gmail.com>2014-08-24 09:47:47 -0700
commit4bfd66346630d389a5c57ed2d9bd5ace0e8b8d2f (patch)
treef70a02a6ef68cfaef2bef345a5eca56dbed8e18f
parent8f7d1833f6e6b304e706bb84848dbf86a80834c8 (diff)
downloadsnap-4bfd66346630d389a5c57ed2d9bd5ace0e8b8d2f.tar.gz
snap-4bfd66346630d389a5c57ed2d9bd5ace0e8b8d2f.zip
fix #566
-rw-r--r--.gitignore1
-rw-r--r--paint.js3
2 files changed, 3 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore
index e43b0f9..f31b3e2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
.DS_Store
+*.swp
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);