diff options
| author | Hardmath123 <hardmath123@gmail.com> | 2014-08-24 09:47:47 -0700 |
|---|---|---|
| committer | Hardmath123 <hardmath123@gmail.com> | 2014-08-24 09:47:47 -0700 |
| commit | 4bfd66346630d389a5c57ed2d9bd5ace0e8b8d2f (patch) | |
| tree | f70a02a6ef68cfaef2bef345a5eca56dbed8e18f | |
| parent | 8f7d1833f6e6b304e706bb84848dbf86a80834c8 (diff) | |
| download | snap-byow-4bfd66346630d389a5c57ed2d9bd5ace0e8b8d2f.tar.gz snap-byow-4bfd66346630d389a5c57ed2d9bd5ace0e8b8d2f.zip | |
fix #566
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | paint.js | 3 |
2 files changed, 3 insertions, 1 deletions
@@ -1 +1,2 @@ .DS_Store +*.swp @@ -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); |
