Hi - I'm afraid you can't easily because widgets tend to call g.clearRect to fill their backgrounds with the background color.
You can just change the theme temporarily with g.setTheme to get the widgets to use the solid background color you want. waveclk does this if you want an example.
Otherwise you may be able to override each widget's default draw method to render it to an offscreen canvas, and then draw that canvas with a transparent color over the background - but that's a lot of work, and likely to be quite slow
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.
Hi - I'm afraid you can't easily because widgets tend to call
g.clearRect
to fill their backgrounds with the background color.You can just change the theme temporarily with
g.setTheme
to get the widgets to use the solid background color you want.waveclk
does this if you want an example.Otherwise you may be able to override each widget's default draw method to render it to an offscreen canvas, and then draw that canvas with a transparent color over the background - but that's a lot of work, and likely to be quite slow