Revert "Commit before dropping the fill tool idea and reverting to the first lasso version"

This reverts commit 5b6b3d33bc.
This commit is contained in:
Nicola
2022-01-02 21:57:35 +01:00
parent 5b6b3d33bc
commit bd1a806f11
4 changed files with 65 additions and 115 deletions

View File

@ -1,20 +1,6 @@
// Acts as a public static class
class Util {
/** Colors a pixel in an image data
*
* @param {*} tempImage The imagedata to paint
* @param {*} pixelPos Index of the pixel
* @param {*} fillColor Color to use to paint
*/
static colorPixel(tempImage, pixelPos, fillColor) {
//console.log('colorPixel:',pixelPos);
tempImage.data[pixelPos] = fillColor.r;
tempImage.data[pixelPos + 1] = fillColor.g;
tempImage.data[pixelPos + 2] = fillColor.b;
tempImage.data[pixelPos + 3] = 255;
}
/** Tells if a pixel is empty (has alpha = 0)
*
* @param {*} pixel