• Not really... but you can draw a filled rectangle (https://www.espruino.com/Reference#l_Gra­phics_fillRect) with the background color... of course, you have to know what the font / font size was, the text you want to remove ("Hello Word"). Font / Font size gives you the height and the width you can ask the Espruino Graphics object: https://www.espruino.com/Reference#t_l_G­raphics_stringWidth.

    To do such things efficiently, you build yourself a DOM - Display Object Model - just as every browser does, so you can find by different means the things you want to erase or override, etc. It's quite a daunting task... but you can do that. That also allows you then to redraw / restore a screen that you have (partially) overwritten with, for example, a pop-up / menu, etc. - on close of that particular pop-up or menu. An other option of handling pop-up like overwrites is to save the graphics buffer - either full or just what is overwritten... but that's not that easy and with colors or grey scale it's also memory consuming - as you calculate yourself - and slow...

  • @allObjects thanks. I was brain storming an idea. Code an object called "pages" and store text, font size for different pages. Each pcb button will be a different page that contains graphic data(text, color, font and etc)


Avatar for allObjects @allObjects started