<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[M5.Lcd.printf writes over previous print]]></title><description><![CDATA[<p dir="auto">I wanted to do something I thought was simple.</p>
<pre><code>      M5.Lcd.setTextSize(2);
      M5.Lcd.setTextColor(ORANGE);

      for(int x=0; x &lt; 100;x++)
      {
        M5.lcd.setCursor(240,165);
        M5.Lcd.print(x);
      }
</code></pre>
<p dir="auto">Yet, when it prints to the LCD they just overlap to the point where its all just a blob. I have tried M5.Lcd.printf, M5.Lcd.print, M5.Lcd.drawNumber, and M5.Lcd.drawString and they all do the same thing.<br />
I.E. it does not clear the pixels to the background color that are not part of what being drawn.<br />
My next though was that i needed to use fillRect inbetween prints, but that seems like a waste of cpu time to do that.<br />
Would it not be better to have an extra option for all these to set non used pixels to a background color when it prints?<br />
I.E. drawString(const char *string, int32_t poX, int32_t poY, , uint16_t color);</p>
<p dir="auto">OR, is there another way that I am just not seeing.</p>
]]></description><link>https://community.m5stack.com/topic/3401/m5-lcd-printf-writes-over-previous-print</link><generator>RSS for Node</generator><lastBuildDate>Wed, 29 Apr 2026 23:34:13 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/3401.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 26 Jun 2021 19:54:25 GMT</pubDate><ttl>60</ttl></channel></rss>