Glad you got this sorted! It's worth noting that sometimes Widgets do clear their own backgrounds so you may not be able to avoid this. If you just need to change the colour you can use setTheme - see Wave Clock for an example.
Potentially there's another method which is to provide a 16 bit offscreen buffer for each widget, render to that (but with a custom background colour like 0x0001) and then use that as a transparent colour with g.drawImage. It's all extremely involved though! There is some code on the forum to do with doubling the size/relocating widgets that could be used as a base
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.
Glad you got this sorted! It's worth noting that sometimes Widgets do clear their own backgrounds so you may not be able to avoid this. If you just need to change the colour you can use
setTheme
- see Wave Clock for an example.Potentially there's another method which is to provide a 16 bit offscreen buffer for each widget, render to that (but with a custom background colour like 0x0001) and then use that as a transparent colour with
g.drawImage
. It's all extremely involved though! There is some code on the forum to do with doubling the size/relocating widgets that could be used as a base