Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
joeldo
on May 23, 2023
|
parent
|
context
|
favorite
| on:
Instant flood fill with HTML Canvas
For vector style graphics (like in the article) - You can achieve this quite simply on the web with SVG DOM.
You can add event listeners to the SVG's paths/groups and apply fill when clicked.
yuchi
on May 24, 2023
[–]
Even better, you can just use a single listener and on click verify the element under the cursor with document.elementFromPoint
Consider applying for YC's Summer 2026 batch! Applications are open till May 4
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search:
You can add event listeners to the SVG's paths/groups and apply fill when clicked.