<?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>MQX Software Solutions中的主题 Re: D4D Object Moving</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/D4D-Object-Moving/m-p/157630#M889</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, i´m in the same trouble. I´m trying to move a button in the screen, just moving it to another coordinate, but what it really happens is, the button that I declared INRAM just refresh on the screen, and do not moves.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I changed the MovePicture to MoveButton, redeclared all of the pointers and structures to work with D4D_BUTTON, but it did&amp;nbsp;not work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you help me?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Aug 2012 21:44:38 GMT</pubDate>
    <dc:creator>james07</dc:creator>
    <dc:date>2012-08-15T21:44:38Z</dc:date>
    <item>
      <title>D4D Object Moving</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/D4D-Object-Moving/m-p/157627#M886</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How do you move a picture object around the screen after you have declared it? &amp;nbsp;Maybe a picture isn't the right type of object for this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example, I have a logo that I want to move around the screen like a screensaver. &amp;nbsp;I have tried to manipulate the x and y coordinates of that object, but it crashes my system.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;D4D_DECLARE_STD_PICTURE(scrn_logo, 70, 50, &amp;amp;bmp_Logo);static void Screen_OnMain(){    D4D_PICTURE *pict;    pict = D4D_GET_PICTURE(&amp;amp;scrn_logo);    pict-&amp;gt;scrPos.y += 1;}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;This obviously isn't the correct way to do this. &amp;nbsp;I cut out code in this example that deals with timing and bound checking; that is not the problem I'm having.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2020 09:02:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/D4D-Object-Moving/m-p/157627#M886</guid>
      <dc:creator>Toe</dc:creator>
      <dc:date>2020-10-29T09:02:23Z</dc:date>
    </item>
    <item>
      <title>Re: D4D Object Moving</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/D4D-Object-Moving/m-p/157628#M887</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Toe,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You have to declare the object in RAM:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;D4D_DECLARE_STD_PICTURE_INRAM(mov_picture, BRD_POSX, BRD_POSY, &amp;amp;bmp_blue)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In&amp;nbsp;any point of your program you can change coordinates and move the picture:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;       POSX=POSX+10;        POSY=POSY+10;        pPoint-&amp;gt;x=POSX;        pPoint-&amp;gt;y=POSY;        MovePicture((D4D_OBJECT*)&amp;amp;mov_picture, pPoint);&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;This is the MovePicture function, you have to 'erase' the previous position on the screen, as eGUI doesn't save any screen content.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;void MovePicture(D4D_OBJECT* pPictObject, D4D_POINT* pPoint){      D4D_PICTURE* pPict = D4D_GET_PICTURE(pPictObject);    D4D_SIZE size = { 64, 64  };      D4D_FillRect(&amp;amp;(pPict-&amp;gt;scrPos), &amp;amp; size, D4D_COLOR_RGB(192, 192, 192));    pPict-&amp;gt;scrPos = *pPoint;    D4D_InvalidateObject(pPictObject, D4D_TRUE);}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;You will have to work&amp;nbsp;with&amp;nbsp;a solid color in the background.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Luis&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2020 09:02:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/D4D-Object-Moving/m-p/157628#M887</guid>
      <dc:creator>LuisCasado</dc:creator>
      <dc:date>2020-10-29T09:02:25Z</dc:date>
    </item>
    <item>
      <title>Re: D4D Object Moving</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/D4D-Object-Moving/m-p/157629#M888</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you, that's what I was looking for.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Aug 2011 01:05:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/D4D-Object-Moving/m-p/157629#M888</guid>
      <dc:creator>Toe</dc:creator>
      <dc:date>2011-08-11T01:05:38Z</dc:date>
    </item>
    <item>
      <title>Re: D4D Object Moving</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/D4D-Object-Moving/m-p/157630#M889</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, i´m in the same trouble. I´m trying to move a button in the screen, just moving it to another coordinate, but what it really happens is, the button that I declared INRAM just refresh on the screen, and do not moves.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I changed the MovePicture to MoveButton, redeclared all of the pointers and structures to work with D4D_BUTTON, but it did&amp;nbsp;not work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you help me?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Aug 2012 21:44:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/D4D-Object-Moving/m-p/157630#M889</guid>
      <dc:creator>james07</dc:creator>
      <dc:date>2012-08-15T21:44:38Z</dc:date>
    </item>
  </channel>
</rss>

