Closed smalljop closed 4 months ago
Unfortunately html canvas doesn't have a concept of layers. So your background image could be drawn just like the signature and it wouldn't know the difference. In other words erasing will erase everything regardless of whether it is an image or not. And there is nothing we can do in signature_pad to change that.
One thing you can do is instead of adding the image to the canvas make the canvas background transparent and put the image behind it with position absolute or some other css.
Thanks for your reply. If I set the image as the unit's label, then toDataURL will only have manually drawn content. If I want to get the image including the background, how can I do it?
Once you have the final signature you can create a new canvas with the image and signature and get the full image that way
Got it. Thank you.
6
Can fromDataURL and erase be used together? Set compositeOperation to destination-out for erasing. After erasing, white lines will appear on the background image. How can I solve this problem? Thank you