ShaMan123 / erase2d

A simple erasing tool for canvas apps
https://shaman123.github.io/erase2d/
Other
14 stars 3 forks source link

toSVG for fabricObject with eraser gives incorrect svg #45

Open hamzawain7 opened 1 month ago

hamzawain7 commented 1 month ago

image

ShaMan123 commented 1 month ago

I didn't impl ClippingGroup#toSVG You can pr based on the old code that exists on fabric in eraser_brush.mixin In general I don't trust fabric toSVG and use node canvas to do that out of the box.

mtrabelsi commented 1 week ago

Hi @ShaMan123 or how about using toJSON() since it is technically almost an SVG and can be loaded into another canvas. will eraser work there too?

ShaMan123 commented 1 week ago

toJSON should work as expected