Bug in alpha channel conversion

This is groundwork required by the issue:
https://github.com/LLK/scratch-vm/issues/393
This commit is contained in:
griffpatch
2017-01-27 12:26:11 +00:00
parent 9841de85f1
commit 6f5acfee7b

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] * 255);
const a = Math.round(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';