Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
flood fill ?
#3
Thanks for your reply!

(04-23-2025, 11:06 PM)bplus Wrote: Looks like only solid border colors work. here is my test:
...
I notice in Wiki bordercolor% is an integer or long, need unsigned long to handle alphas.
Yep, which is not what I'm looking for... Have you seen any good "flood fill" examples? 

Code: (Select All)
Screen _NewImage(800, 600, 32)
_ScreenMove 0, 0
Cls , _RGB32(0, 0, 0)

' clear screen and draw circles
Cls , _RGB32(0, 0, 0)
x = 0: y = 0
x = x + 100: y = y + 75: Circle (x, y), 50, _RGB32(255, 0, 0) ' red
x = x + 100: y = y + 75: Circle (x, y), 50, _RGB32(0, 255, 0) ' green
x = x + 100: y = y + 75: Circle (x, y), 50, _RGB32(0, 0, 255) ' blue
x = x + 100: y = y + 75: Circle (x, y), 50, _RGB32(0, 255, 255) ' cyan
x = x + 100: y = y + 75: Circle (x, y), 50, _RGB32(255, 255, 0) ' yellow
x = x + 100: y = y + 75: Circle (x, y), 50, _RGB32(255, 0, 255) ' magenta

Color _RGB32(0, 0, 0), _RGB32(255, 255, 255): Locate 10, 1
Input "press Enter to try fill with paint with border _RGB32(0, 0, 0, 100)"; in$

' How to fill in the background only, ie specify anything EXCEPT the background color as "border"?
x = 10: Paint (x, y), _RGB32(255, 255, 255), _RGB32(0, 0, 0, 100)

Color _RGB32(0, 0, 0), _RGB32(255, 255, 255): Locate 10, 1
Input "press Enter to continue"; in$

' clear screen and draw circles
Cls , _RGB32(0, 0, 0)
x = 0: y = 0
x = x + 100: y = y + 75: Circle (x, y), 50, _RGB32(255, 0, 0) ' red
x = x + 100: y = y + 75: Circle (x, y), 50, _RGB32(0, 255, 0) ' green
x = x + 100: y = y + 75: Circle (x, y), 50, _RGB32(0, 0, 255) ' blue
x = x + 100: y = y + 75: Circle (x, y), 50, _RGB32(0, 255, 255) ' cyan
x = x + 100: y = y + 75: Circle (x, y), 50, _RGB32(255, 255, 0) ' yellow
x = x + 100: y = y + 75: Circle (x, y), 50, _RGB32(255, 0, 255) ' magenta

Color _RGB32(0, 0, 0), _RGB32(255, 255, 255): Locate 10, 1
Input "press Enter to try fill with paint with border _RGB32(0, 0, 255) "; in$

' Just fill in the background?
x = 10: Paint (x, y), _RGB32(255, 255, 255), _RGB32(0, 0, 255) ' to circle border

Color _RGB32(0, 0, 0), _RGB32(255, 255, 255): Locate 10, 1
Input "Done. Press Enter to exit"; in$
System
Reply


Messages In This Thread
flood fill ? - by madscijr - 04-23-2025, 07:38 PM
RE: flood fill ? - by bplus - 04-23-2025, 11:06 PM
RE: flood fill ? - by madscijr - 04-24-2025, 12:08 AM
RE: flood fill ? - by bplus - 04-24-2025, 12:20 AM
RE: flood fill ? - by SMcNeill - 04-24-2025, 12:44 AM
RE: flood fill ? - by SMcNeill - 04-24-2025, 12:54 AM
RE: flood fill ? - by madscijr - 04-24-2025, 03:23 AM
RE: flood fill ? - by Petr - 04-24-2025, 01:28 PM
RE: flood fill ? - by madscijr - 04-24-2025, 11:50 PM
RE: flood fill ? - by SMcNeill - 04-25-2025, 12:58 AM
RE: flood fill ? - by SMcNeill - 04-25-2025, 01:52 AM
RE: flood fill ? - by madscijr - 04-25-2025, 05:51 AM
RE: flood fill ? - by madscijr - 04-25-2025, 02:27 AM
RE: flood fill ? - by SMcNeill - 04-25-2025, 11:36 AM
RE: flood fill ? - by madscijr - 04-25-2025, 01:11 PM
RE: flood fill ? - by madscijr - 04-25-2025, 06:49 PM
RE: flood fill ? - by madscijr - 04-25-2025, 07:36 PM
RE: flood fill ? - by TempodiBasic - 04-27-2025, 07:15 PM
RE: flood fill ? - by madscijr - 04-27-2025, 08:36 PM
RE: flood fill ? - by CMR - 04-29-2025, 02:56 AM
RE: flood fill ? - by SMcNeill - 04-29-2025, 02:59 AM
RE: flood fill ? - by CMR - 05-01-2025, 05:59 PM
RE: flood fill ? - by SMcNeill - 05-01-2025, 07:20 PM
RE: flood fill ? - by CMR - 05-03-2025, 02:28 AM
RE: flood fill ? - by Petr - 05-01-2025, 06:35 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Simple Brick Pattern Fill Question NakedApe 3 918 12-01-2023, 09:37 PM
Last Post: NakedApe

Forum Jump:


Users browsing this thread: 1 Guest(s)