loboris / ESP32_TFT_library

Full featured TFT library for ESP32 with demo application
564 stars 219 forks source link

Bug: TFT_clearStringRect not working correctly #41

Open sukeshak opened 6 years ago

sukeshak commented 6 years ago

I tried using TFT_clearStringRect but found a bug. I changed the last parameter in the implementation to TFT_BLUE to troubleshoot.

Not sure why but here is how its working now Before TFT_fillRect(x+dispWin.x1, y+dispWin.y1, w, h, _bg); After TFT_fillRect(x+dispWin.x1, y+dispWin.y1-(h*2), w, h+1, _bg);

I haven't gone through the entire code, so not sure why your line does not work.

Suggestion: Can we change the 3rd parameter to number of characters so that its easy to specify how far the line needs to be cleared?

The buffer idea works only if you have same length string being printed. Otherwise if the previous string was longer, there will be left overs.

da-vics commented 4 years ago

@sukeshak were you able to solve this?