mirror of
https://github.com/lospec/pixel-editor.git
synced 2023-08-10 21:12:51 +03:00
Implemented eraser tool. Must move and resize layers at the same time.
Signed-off-by: npalomba <nicola.palomba@studenti.galileilivorno.gov.it>
This commit is contained in:
@ -15,10 +15,10 @@ document.getElementById('open-image-browse-holder').addEventListener('change', f
|
||||
newPixel(this.width, this.height, []);
|
||||
|
||||
//draw the image onto the canvas
|
||||
context.drawImage(img, 0, 0);
|
||||
currentLayer.context.drawImage(img, 0, 0);
|
||||
|
||||
var colorPalette = {};
|
||||
var imagePixelData = context.getImageData(0,0,this.width, this.height).data;
|
||||
var imagePixelData = currentLayer.context.getImageData(0,0,this.width, this.height).data;
|
||||
|
||||
var imagePixelDataLength = imagePixelData.length;
|
||||
|
||||
|
Reference in New Issue
Block a user