Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

A better way to do it would be to maintain canvas Path2d objects to define the enclosed regions, which can be instantly filled with context.fill()

No need for complex pixel manipulation stuff

This also lets you do things like let the user move things around.



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: