There is also https://github.com/espruino/BangleApps/blob/master/modules/graphics_utils.js. Maybe you can use that or modify it to have the features you need.
As for "local" development a relatively simple way is to check out the BangleApps and EspruinoWebIDE repos with their submodules and start a webserver in the parent folder of those. I use python3 -m http.server 4001 --bind 127.0.0.1. You can then access app loader and IDE at localhost:4001/BangleApps and localhost:4001/EspruinoWebIDE. Any webserver should work for that. It should be on the same machine as you work on since hosting it at another IP means you need to setup certificates for web bluetooth to work. There is an exception in the security rules for localhost.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
There is also https://github.com/espruino/BangleApps/blob/master/modules/graphics_utils.js. Maybe you can use that or modify it to have the features you need.
As for "local" development a relatively simple way is to check out the BangleApps and EspruinoWebIDE repos with their submodules and start a webserver in the parent folder of those. I use
python3 -m http.server 4001 --bind 127.0.0.1
. You can then access app loader and IDE at localhost:4001/BangleApps and localhost:4001/EspruinoWebIDE. Any webserver should work for that. It should be on the same machine as you work on since hosting it at another IP means you need to setup certificates for web bluetooth to work. There is an exception in the security rules for localhost.