Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
flood fill ?
#10
A few things to note about this code, which broked my poor brain.  Big Grin

1) Your are mapping your instructions wrong.   
Mousebutton(1) is the left button.
Mousebutton(2) is the right button.
MouseButton(3) is the middle button.

Instructions say : STEVE IS MIDDLE BUTTON..

Code say:             ' Steve
            If mb2 Then Fill mx, my, arrColor(index)

So...  Steve Fill is the right mouse button.  Big Grin
Petr fill is middle mouse button.



And why does Steve's Fill not fill?

Because of your specifications that you asked for with your opening post:

Quote:how do you get it to stop at any color where the alpha value > 0


Steve's Fill was designed to work on _RGBA32(0,0,0,0) colors, and not fill anything else. You start out with a CLS , _RGB32(0,0,0) statement which fills the entire screen with BLACK with 255 ALPHA, and I designed it so that it stops at "any color where the alpha value > 0"...

That's why it poops points. It basically is doing a PSET for you at the point you click on (there's no check for that, so you always get one free pixel colored before the check for that transparent background kicks in). The Fill routine I wrote isn't going to work in this scenario at all, just because you're completely changing what it was asked to do. You asked for a fill for 0 alpha, to stop when alpha is > 0... and then you paint the whole screen 255 alpha.

It's not going to work like that unless you go in and tweak the color checking routines first.

Seems like you need to decide what exactly you want to do, before you start trying to create code to do something that you're not wanting done. Wink
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



Users browsing this thread: 2 Guest(s)