I want to create an online drawing tool using fabric js deployed in a PHP web page.Most of the customized tools of fabric,js, i created successfully.
But i cannot create Eraser tool like in MS Paint eraser..
I found this alternative method for eraser.This will do mask whilte color in the object
function eraser() {
mode = 'pencil';
canvas.isDrawingMode = true;
canvas.freeDrawingBrush.width = strokeWidth;
canvas.freeDrawingBrush.color = 'white';
}
But, I want to create an eraser similar to MS Paint. I checked in SO, In Fabric js there is no built in eraser
Plz any one help me.
Is it possible to make eraser in fabric js?.
if not possible, Can you suggest any easy alternative of fabric js, like any open source/free web drawing tool which will support the function of eraser.