<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Approximatrix Forums — How to fill the area between two circles?]]></title>
		<link>https://forums.approximatrix.com/viewtopic.php?id=605</link>
		<atom:link href="https://forums.approximatrix.com/extern.php?action=feed&amp;tid=605&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in How to fill the area between two circles?.]]></description>
		<lastBuildDate>Wed, 22 Feb 2017 10:02:02 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: How to fill the area between two circles?]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=2755#p2755</link>
			<description><![CDATA[<p>Thank you jeff.</p>]]></description>
			<author><![CDATA[null@example.com (EricE)]]></author>
			<pubDate>Wed, 22 Feb 2017 10:02:02 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=2755#p2755</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to fill the area between two circles?]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=2752#p2752</link>
			<description><![CDATA[<p>Flood-filling circles can be problematic because of the nature how AppGraphics (or really any graphics library) draws circles.&nbsp; Often, like you&#039;ve witnessed, the circumference line is not continuous, allowing the flood fill to &quot;escape.&quot; </p><p>I would suggest perhaps using <em>fillellipse</em> instead to create an already-filled circle.&nbsp; To create the opposite effect for the inner circle, you could change the fill color and call <em>fillellipse</em> again.&nbsp; It would probably be more reliable than relying on a fill algorithm that is bound to be problematic whenever lines are not exactly horizontal or vertical.</p>]]></description>
			<author><![CDATA[null@example.com (jeff)]]></author>
			<pubDate>Tue, 21 Feb 2017 17:45:49 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=2752#p2752</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to fill the area between two circles?]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=2751#p2751</link>
			<description><![CDATA[<p>Now this does work!<br />Any ideas why?<br />All I did was add an additional circle with radius=201.</p><p>Did the original outer circle (R=200) have some gaps that the second outer circle (R=201) closed?<br />Increasing R=201 to 202 and the program still works in filling in only the annular region, but at R=203 the code fails again and the color floods past the outermost circle</p><div class="codebox"><pre><code>!--------------------------------------------------------------------------------------
program main
use appgraphics
implicit none

    integer::myscreen
    myscreen = initwindow(800, 800,title=&#039;Graphics test 2&#039;,closeflag=.TRUE.)
    call setbkcolor(WHITE)
    call clearviewport()
    
    call setcolor(BLACK)
    call circle(300,300,100)
    call circle(300,300,200) 

    call circle(300,300,201)  
    
    call setfillstyle(SOLID_FILL, GREEN)
    call floodfill(300,450,BLACK)

    call loop()
    
    call closewindow(myscreen)
    
end program main
!--------------------------------------------------------------------------------------</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (EricE)]]></author>
			<pubDate>Tue, 21 Feb 2017 03:05:32 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=2751#p2751</guid>
		</item>
		<item>
			<title><![CDATA[How to fill the area between two circles?]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=2749#p2749</link>
			<description><![CDATA[<p>I am trying to color fill the area between two concentric circles.</p><p>My code is below, but it does not work.<br />The color fill goes beyond the outer circle.</p><div class="codebox"><pre><code>!--------------------------------------------------------------------------------------
program main
use appgraphics
implicit none

    integer::myscreen
    myscreen = initwindow(800, 800,title=&#039;Graphics test 2&#039;,closeflag=.TRUE.)
    call setbkcolor(WHITE)
    call clearviewport()
    
    call setcolor(BLACK)
    call circle(300,300,100)     ! inner circle
    call circle(300,300,200)     ! outer circle
    
    call setfillstyle(SOLID_FILL, GREEN)
    call floodfill(300,450,BLACK)

    call loop()
    
    call closewindow(myscreen)
    
end program main
!--------------------------------------------------------------------------------------</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (EricE)]]></author>
			<pubDate>Mon, 20 Feb 2017 07:27:37 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=2749#p2749</guid>
		</item>
	</channel>
</rss>
