m5stack / M5Cloud

Micropython Web IDE beta version
http://io.m5stack.com/
145 stars 35 forks source link

Ability to set background color #15

Open pastukhov opened 6 years ago

pastukhov commented 6 years ago

Is it possible to set background color without lcd.clear()?

0x1abin commented 6 years ago

Yes. you can: lcd.clear(color=lcd.ORANGE) or lcd.fill(color=lcd.ORANGE)

pastukhov commented 6 years ago

It will reset wole screen. I need to display few strings with different background color each. Is it possible?

0x1abin commented 6 years ago

lcd.setTextColor(color=lcd.BLACK, bcolor=lcd.WHITE) This function can set the text background color, if you change the background color, you need to repaint the text.

pastukhov commented 6 years ago

Awesome! Almost what i need. But now i see that wrap=True argument for lcd.print isn't accurate. image

pastukhov commented 6 years ago

Is it source code of lcd module available?

mcauser commented 5 years ago

https://github.com/loboris/MicroPython_ESP32_psRAM_LoBo/blob/master/MicroPython_BUILD/components/micropython/esp32/moddisplay.c

Docs: https://github.com/loboris/MicroPython_ESP32_psRAM_LoBo/wiki/display