1

I'm drawing an image onto a canvas using drawImage. It's a PNG that is surrounded by transparent pixels, like this:

enter image description here

How can I detect a path to the visible part of that image on the canvas?

Check it out full code on Github

Check it out live demo IonCanvas

user9088454
  • 1,076
  • 1
  • 15
  • 45
  • https://stackoverflow.com/a/8751659/916000 may help you. – Taha Paksu Nov 11 '19 at 08:46
  • What do you want to do with that "path"? There are many solutions to this problem, each dependent on the real needs. – Kaiido Nov 11 '19 at 09:48
  • I want to show accuracy using draw path(use pen/ brush etc). In image 1 is black and the background of the image is transparent. I want to detect if a user draws in a transparent part, show alert or something like I will show. – user9088454 Nov 11 '19 at 09:52
  • please check question i added live link of demo and code on git – user9088454 Nov 12 '19 at 10:04

0 Answers0