<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic TWR-LCD eGUI 3.00 &amp; LABEL LIVE UPDATE in ColdFire/68K Microcontrollers and Processors</title>
    <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/TWR-LCD-eGUI-3-00-LABEL-LIVE-UPDATE/m-p/746292#M13368</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I am using TWR-LCD and eGUI 3.00.&lt;/P&gt;&lt;P&gt;I am tring to display live data using the D4D_LabelSetText.&lt;/P&gt;&lt;P&gt;The code is the follow:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;// Screen "Main" function called periodically in each D4D_poll runs&lt;BR /&gt;static void myScreenAbout_OnMain()&lt;BR /&gt;{&lt;BR /&gt; D4D_TCHAR buff[10];&lt;BR /&gt; &lt;BR /&gt; //(void) sprintf(buff, "%lx", k);&lt;BR /&gt; buff[1] = 0;&lt;BR /&gt; &lt;BR /&gt; if (k &amp;lt; 1000) buff[0] = '1'; &lt;BR /&gt; else if (k &amp;lt; 2000) buff[0] = '2';&lt;BR /&gt; else if (k &amp;lt; 3000) buff[0] = '3';&lt;BR /&gt; else if (k &amp;lt; 4000) buff[0] = '4';&lt;BR /&gt; else if (k &amp;lt; 5000) buff[0] = '5'; &lt;BR /&gt; else k=0;&lt;BR /&gt; &lt;BR /&gt; D4D_LabelSetText(&amp;amp;my_label, buff); &lt;BR /&gt;}&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;The problem is that the values are overwritten instead of only display the last value&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;SPAN&gt;If I switch transparency off (#define D4D_FNT_PRTY_TRANSPARENT_NO_MASK), I am not able to draw label's text and have the same background color.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;SPAN&gt;Does anyone know how I can redraw the label text, erasing the old text and keep background color?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;SPAN&gt;thank you.&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 28 Nov 2017 21:55:07 GMT</pubDate>
    <dc:creator>Eric_t</dc:creator>
    <dc:date>2017-11-28T21:55:07Z</dc:date>
    <item>
      <title>TWR-LCD eGUI 3.00 &amp; LABEL LIVE UPDATE</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/TWR-LCD-eGUI-3-00-LABEL-LIVE-UPDATE/m-p/746292#M13368</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I am using TWR-LCD and eGUI 3.00.&lt;/P&gt;&lt;P&gt;I am tring to display live data using the D4D_LabelSetText.&lt;/P&gt;&lt;P&gt;The code is the follow:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;// Screen "Main" function called periodically in each D4D_poll runs&lt;BR /&gt;static void myScreenAbout_OnMain()&lt;BR /&gt;{&lt;BR /&gt; D4D_TCHAR buff[10];&lt;BR /&gt; &lt;BR /&gt; //(void) sprintf(buff, "%lx", k);&lt;BR /&gt; buff[1] = 0;&lt;BR /&gt; &lt;BR /&gt; if (k &amp;lt; 1000) buff[0] = '1'; &lt;BR /&gt; else if (k &amp;lt; 2000) buff[0] = '2';&lt;BR /&gt; else if (k &amp;lt; 3000) buff[0] = '3';&lt;BR /&gt; else if (k &amp;lt; 4000) buff[0] = '4';&lt;BR /&gt; else if (k &amp;lt; 5000) buff[0] = '5'; &lt;BR /&gt; else k=0;&lt;BR /&gt; &lt;BR /&gt; D4D_LabelSetText(&amp;amp;my_label, buff); &lt;BR /&gt;}&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;The problem is that the values are overwritten instead of only display the last value&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;SPAN&gt;If I switch transparency off (#define D4D_FNT_PRTY_TRANSPARENT_NO_MASK), I am not able to draw label's text and have the same background color.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;SPAN&gt;Does anyone know how I can redraw the label text, erasing the old text and keep background color?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;SPAN&gt;thank you.&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Nov 2017 21:55:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/TWR-LCD-eGUI-3-00-LABEL-LIVE-UPDATE/m-p/746292#M13368</guid>
      <dc:creator>Eric_t</dc:creator>
      <dc:date>2017-11-28T21:55:07Z</dc:date>
    </item>
    <item>
      <title>Re: TWR-LCD eGUI 3.00 &amp; LABEL LIVE UPDATE</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/TWR-LCD-eGUI-3-00-LABEL-LIVE-UPDATE/m-p/746293#M13369</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know what main board you used with the TWR-LCD, the ColdFire boarrd or the Kinetis?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Nov 2017 08:40:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/TWR-LCD-eGUI-3-00-LABEL-LIVE-UPDATE/m-p/746293#M13369</guid>
      <dc:creator>miduo</dc:creator>
      <dc:date>2017-11-29T08:40:45Z</dc:date>
    </item>
    <item>
      <title>Re: TWR-LCD eGUI 3.00 &amp; LABEL LIVE UPDATE</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/TWR-LCD-eGUI-3-00-LABEL-LIVE-UPDATE/m-p/746294#M13370</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;I am using the ColdFire board &amp;amp; codewarrior 6.3&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Nov 2017 04:41:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/TWR-LCD-eGUI-3-00-LABEL-LIVE-UPDATE/m-p/746294#M13370</guid>
      <dc:creator>Eric_t</dc:creator>
      <dc:date>2017-11-30T04:41:48Z</dc:date>
    </item>
    <item>
      <title>Re: TWR-LCD eGUI 3.00 &amp; LABEL LIVE UPDATE</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/TWR-LCD-eGUI-3-00-LABEL-LIVE-UPDATE/m-p/746295#M13371</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am not familiar with that graphics software on that unit, but I am familiar with other graphics systems.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The normal approach is to have a "drawing window" in memory that the pixels are "painted" to.&lt;/P&gt;&lt;P&gt;Drawing starts with clearing this, filling in the background, drawing buttons and text.&lt;/P&gt;&lt;P&gt;Then that memory is copied to or swapped with the actual "video buffer memory" that is being displayed on the screen.&lt;/P&gt;&lt;P&gt;Then, periodically (20 Hz, 25Hz, 60Hz or when a graphics element changes) the whole process is done again, with a new background/widget/text and so on.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So the WHOLE THING is redrawn, from scratch, every time through some sort of timed loop, or (as an optimisation), only if some data has changed that requires something on the screen to change - different text, number, colour of something, position of a needle and so on.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Otherwise, if you aren't "redrawing the whole thing", then you have to wipe out or repaint the areas that are changing. That would involve a rectangle around the text-box you're drawing. That rectangle needs to be cleared (to the background colour or the background of the text box) and then the new text is drawn. I don't know how many of those actions the "D4D_LabelSetText()" function performs for you, but it may assume something else painted over the previous next so the new text could be literally "drawn on a blank canvas".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have you read the guide in this post, and the link to the Reference manual?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-330064"&gt;https://community.nxp.com/docs/DOC-330064&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The above points to this, and I note the following comment, which means SOMETHING has to be called to redraw the screen:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;The macros with _INRAM postfix creates complete graphic objects in RAM memory and thus all parameters can change runtime, &lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;but the screen must be redrawn manually after each change&lt;/STRONG&gt;&lt;/SPAN&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://gargy007.github.io/egui_doc/egui_description.html"&gt;http://gargy007.github.io/egui_doc/egui_description.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Nov 2017 23:48:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/TWR-LCD-eGUI-3-00-LABEL-LIVE-UPDATE/m-p/746295#M13371</guid>
      <dc:creator>TomE</dc:creator>
      <dc:date>2017-11-30T23:48:01Z</dc:date>
    </item>
  </channel>
</rss>

