Added _checkerboard.js for transparency checkerboard management. Implemented generation of checkerboard (still need to test it properly, for example with weird height/width values).

Signed-off-by: npalomba <nicola.palomba@studenti.galileilivorno.gov.it>
This commit is contained in:
npalomba
2019-03-31 13:28:46 +02:00
parent 7b26ebb5fd
commit 15e6d7b08a
8 changed files with 62 additions and 8 deletions

View File

@ -56,10 +56,13 @@ function newPixel (width, height, palette) {
addColor(defaultBackgroundColor);
//fill background of canvas with bg color
fillCheckerboard();
/*
context.fillStyle = '#'+defaultBackgroundColor;
context.fillRect(0, 0, canvasSize[0], canvasSize[1]);
console.log('#'+defaultBackgroundColor)
*/
//set current drawing color as foreground color
context.fillStyle = '#'+defaultForegroundColor;