<?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[ontimer in rekursiverfunktion]]></title><description><![CDATA[<p>Hallo!</p>
<p>Mein Problem ist das ich ein Polygon anschaulich füllen möchte, mit einem Rekursive Algorithmus,nämlich den BoundaryAlgo.</p>
<pre><code class="language-cpp">void Poly::boundaryfill(int x, int y,TColor colnew, TColor colbor, TImage *img)
{

    if (x &lt; img-&gt;Width &amp;&amp; y &lt; img-&gt;Height)
    if ((colnew != img-&gt;Canvas-&gt;Pixels[x][y]) &amp;&amp; (img-&gt;Canvas-&gt;Pixels[x][y] != colbor ))
        {
        img-&gt;Canvas-&gt;Pixels[x][y] = colnew;
        img-&gt;Refresh();
        //hier hätte ich gerne eine variable Pausenlänge
        boundaryfill(x + 1 , y     , colnew,colbor,img);
        boundaryfill(x - 1 , y     , colnew,colbor,img);
        boundaryfill(x     , y + 1 , colnew,colbor,img);
        boundaryfill(x     , y - 1 , colnew,colbor,img);

    }
}
</code></pre>
<p>Nur irgenwie fällt mir nix ein wie ich das machen könnte!<br />
Kann mir vielleicht jemand weiter helfen.</p>
<p>mfg polygonman</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/96993/ontimer-in-rekursiverfunktion</link><generator>RSS for Node</generator><lastBuildDate>Sat, 11 Jul 2026 12:32:31 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/96993.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 06 Jan 2005 16:25:57 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to ontimer in rekursiverfunktion on Thu, 06 Jan 2005 16:25:57 GMT]]></title><description><![CDATA[<p>Hallo!</p>
<p>Mein Problem ist das ich ein Polygon anschaulich füllen möchte, mit einem Rekursive Algorithmus,nämlich den BoundaryAlgo.</p>
<pre><code class="language-cpp">void Poly::boundaryfill(int x, int y,TColor colnew, TColor colbor, TImage *img)
{

    if (x &lt; img-&gt;Width &amp;&amp; y &lt; img-&gt;Height)
    if ((colnew != img-&gt;Canvas-&gt;Pixels[x][y]) &amp;&amp; (img-&gt;Canvas-&gt;Pixels[x][y] != colbor ))
        {
        img-&gt;Canvas-&gt;Pixels[x][y] = colnew;
        img-&gt;Refresh();
        //hier hätte ich gerne eine variable Pausenlänge
        boundaryfill(x + 1 , y     , colnew,colbor,img);
        boundaryfill(x - 1 , y     , colnew,colbor,img);
        boundaryfill(x     , y + 1 , colnew,colbor,img);
        boundaryfill(x     , y - 1 , colnew,colbor,img);

    }
}
</code></pre>
<p>Nur irgenwie fällt mir nix ein wie ich das machen könnte!<br />
Kann mir vielleicht jemand weiter helfen.</p>
<p>mfg polygonman</p>
]]></description><link>https://www.c-plusplus.net/forum/post/688834</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/688834</guid><dc:creator><![CDATA[polygonman]]></dc:creator><pubDate>Thu, 06 Jan 2005 16:25:57 GMT</pubDate></item><item><title><![CDATA[Reply to ontimer in rekursiverfunktion on Thu, 06 Jan 2005 17:29:13 GMT]]></title><description><![CDATA[<p>was ist Dein Problem?</p>
<p>Dein Algo macht das doch mit der Rekursion.</p>
<p>Oder soll das 'anschaulich' langsam gehen? Dann würde ich die Koordinate (x,y)<br />
und die Farbe in eine Struct (Class) packen und das ganze fuer jedes Pixel in eine TList speichern.</p>
<p>Mit nem OnTimer kann das dann zeitgesteuert aus der TList abgearbeitet werden.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/688909</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/688909</guid><dc:creator><![CDATA[DerAltenburger]]></dc:creator><pubDate>Thu, 06 Jan 2005 17:29:13 GMT</pubDate></item><item><title><![CDATA[Reply to ontimer in rekursiverfunktion on Thu, 06 Jan 2005 17:51:06 GMT]]></title><description><![CDATA[<p>Der Algo funktioniert schon aber ich wollte ihn halt sichtbar machen (also verlangsamen) so das man sieht wie er arbeitet.</p>
<p>Danke für Deinen Tip ich werde es mal so probieren!</p>
<p>mfg Polygonman</p>
]]></description><link>https://www.c-plusplus.net/forum/post/688941</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/688941</guid><dc:creator><![CDATA[polygonman]]></dc:creator><pubDate>Thu, 06 Jan 2005 17:51:06 GMT</pubDate></item><item><title><![CDATA[Reply to ontimer in rekursiverfunktion on Thu, 06 Jan 2005 17:59:51 GMT]]></title><description><![CDATA[<p>Weis nicht ob du das meinst, aber ich könnte mir vorstellen das du was suchst, damit man sieht, wie die Pixel nacheinander &quot;angehen&quot;<br />
Würde das dann <strong>für diesen Zweck</strong> so lösen:<br />
Am Beginn der rekursiven Funktion einfügen:</p>
<pre><code>...
Application-&gt;ProcessMessages();
Sleep(500);  // hier 500ms
...
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/688952</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/688952</guid><dc:creator><![CDATA[Peter81]]></dc:creator><pubDate>Thu, 06 Jan 2005 17:59:51 GMT</pubDate></item></channel></rss>