Merge pull request #81 from griffpatch/bug/alphaChannelConversion

Bug alphachannelconversion
This commit is contained in:
Chris Willis-Ford
2017-02-09 07:49:56 -08:00
committed by GitHub

View File

@@ -181,7 +181,7 @@ class PenSkin extends Skin {
const r = Math.round(color4f[0] * 255);
const g = Math.round(color4f[1] * 255);
const b = Math.round(color4f[2] * 255);
const a = Math.round(color4f[3]); // Alpha is 0 to 1 (not 0 to 255 like r,g,b)
const a = color4f[3]; // Alpha is 0 to 1 (not 0 to 255 like r,g,b)
context.strokeStyle = `rgba(${r},${g},${b},${a})`;
context.lineCap = 'round';