mirror of
https://github.com/lospec/pixel-editor.git
synced 2023-08-10 21:12:51 +03:00
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:
@ -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;
|
||||
|
Reference in New Issue
Block a user