<?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[text or shape is overwritten by the background.]]></title><description><![CDATA[<p dir="auto">When I upload my Timer App code to core2 via uiflow v1.8.2, a weird rectangle covers the text.<br />
The following steps will reproduce the bug.</p>
<ol>
<li>
<p dir="auto">copy &amp; paste the following code to the python pane on the online uiflow v1.8.2.<br />
<a href="https://pastebin.pl/view/34cb6154" target="_blank" rel="noopener noreferrer nofollow ugc">https://pastebin.pl/view/34cb6154</a></p>
</li>
<li>
<p dir="auto">download &amp; save the following images with given names</p>
</li>
</ol>
<p dir="auto">charging2.png<br />
<img src="/assets/uploads/files/1629052371588-chargning2.png" alt="0_1629052403724_chargning2.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">TimerBG2.png<br />
<img src="/assets/uploads/files/1629052350039-timerbg2.png" alt="0_1629052381688_TimerBG2.png" class=" img-fluid img-markdown" /></p>
<ol start="3">
<li>
<p dir="auto">connect the online uiflow v1.8.2 with core2 (internet mode), and upload two images above to your core2 by pressing the MANAGER button on the online uiflow menu bar.</p>
</li>
<li>
<p dir="auto">Run the program by pressing the "RUN" button on the online uiflow menu bar. (it works as expected)</p>
</li>
<li>
<p dir="auto">Upload the program to core2 by pressing the "DOWNLOAD" button on the online uiflow menu bar (it shows the weird rectangle).</p>
</li>
<li>
<p dir="auto">Reset core2 and switched to the internet mode, and then redo step 4, it shows the weird rectangle...</p>
</li>
</ol>
<p dir="auto">It seems like the background image or color is overwritten onto a certain area of the lcd graphic buffer (or the area is cleared).</p>
<p dir="auto">After following the steps above, you can run the code below to see what happens.<br />
the rectangle will be replaced with the background color.</p>
<pre><code>from m5stack import *
from m5stack_ui import *
from uiflow import *
import time

screen = M5Screen()
screen.clean_screen()
screen.set_screen_bg_color(0xFFFFFF)

screen.set_screen_bg_color(0xffff00)
wait(1)
lcd.font(lcd.FONT_DejaVu72)
lcd.print('TEST', 72, 110, 0x3333ff)
# This rectangle is unexpectedly swapped by background
# color or image behind text or shapes(e.g. rectangle).
lcd.rect(35, 132, 274, 16, color=0xff0000)
wait(1)
lcd.clear()
wait(1)
screen.set_screen_bg_color(0xff0000)
wait(1)
lcd.clear()
</code></pre>
<p dir="auto">My core2 has 1.8.2 firmware written via M5Burner.<br />
The same thing happens on uiflow v1.8.1 with firmware v1.8.1, and 1.8.0.</p>
]]></description><link>https://community.m5stack.com/topic/3523/text-or-shape-is-overwritten-by-the-background</link><generator>RSS for Node</generator><lastBuildDate>Wed, 11 Mar 2026 01:44:29 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/3523.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 15 Aug 2021 19:00:03 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to text or shape is overwritten by the background. on Sun, 15 Aug 2021 19:48:23 GMT]]></title><description><![CDATA[<p dir="auto">I forgot to add the picture of the screen when the bug happens.</p>
<p dir="auto">This is the screenshot of step 5<br />
<img src="/assets/uploads/files/1629056268496-core2bug1-resized.jpg" alt="0_1629056297913_core2bug1.jpg" class=" img-fluid img-markdown" /><br />
it seems like a part of M5Img (in a rectangle (35,132, 274,16) is written back onto the text.</p>
<p dir="auto">and this is the screenshot of the code above (right after calling lcd.rect(...) )<br />
<img src="/assets/uploads/files/1629056381759-core2bug2-resized.jpg" alt="0_1629056411470_core2bug2.jpg" class=" img-fluid img-markdown" /><br />
and the rectangle (35,132,274,16) is overwritten with the background.<br />
when you use M5Img instead of screen.set_screen_bg_color, you will see a part of the image instead of the background.</p>
<p dir="auto">in both screenshots, text must be shown without a black/yellow rectangle.</p>
]]></description><link>https://community.m5stack.com/post/14653</link><guid isPermaLink="true">https://community.m5stack.com/post/14653</guid><dc:creator><![CDATA[wingtiger]]></dc:creator><pubDate>Sun, 15 Aug 2021 19:48:23 GMT</pubDate></item></channel></rss>