Author Topic: how do I fill a circle using floodfill  (Read 1406 times)

lachu

  • Newbie
  • *
  • Posts: 7
how do I fill a circle using floodfill
« on: June 13, 2011, 12:52:32 am »
how do I fill a circle using floodfill? can anyone help me.


kathir

  • Administrator
  • Sr. Member
  • *****
  • Posts: 283
Re: how do I fill a circle using floodfill
« Reply #1 on: June 13, 2011, 12:55:06 am »
filling a circle is very easy. You can directly use fillellipise and have
xraidus and yradius as same.

for using floofill,


cx = 100; cy = 100; radius = 25;
setcolor(WHITE)
circle(cx, cy, raidus);

setfillstyle(SOLID_FILL, BLUE);
floodfill(cx, cy, WHITE); // It will the circle in BLUE color

Hope this helps...!

 


Disclaimer: This web site is for educational and informational purposes only. Click here to read the Disclaimer.
Content copyright 2010-2014. Kathiresan. All rights reserved.
This page is using SMF version 2.0.1