peterhinch / micropython-micro-gui

A lightweight MicroPython GUI library for display drivers based on framebuf, allows input via pushbuttons. See also micropython-touch.
MIT License
247 stars 37 forks source link

Fully clear the screen #18

Closed Leonti closed 1 year ago

Leonti commented 1 year ago

Use the full width and height of the screen to clear it. Currently, when clearing the screen the width and the height are reduced by one, leaving lines on the screen's bottom and right. Fox example, with ssd1306 with width 128 and height 64 only first 127 and 63 pixels will be cleared.

Not fully sure about the impact on other screens, but this change got rid of artifacts from previous screens on ssd1306.

peterhinch commented 1 year ago

Thanks for that. I have very occasionally observed this myself.