Sujet : Re: filling area by color atack safety
De : fir (at) *nospam* grunge.pl (fir)
Groupes : comp.lang.cDate : 19. Mar 2024, 23:52:30
Autres entêtes
Organisation : i2pn2 (i2pn.org)
Message-ID : <utd4ur$2e4vj$1@i2pn2.org>
References : 1 2 3
User-Agent : Mozilla/5.0 (Windows NT 5.1; rv:27.0) Gecko/20100101 Firefox/27.0 SeaMonkey/2.24
David Brown wrote:
rks, especially if the flood-fill is on live displayed data rather than
in a buffer off-screen. But typically you need to get a /lot/ more
advanced (i.e., not your algorithm) to improve on the OP's version by an
order of magnitude, so if speed is not essential but understanding that
it is correct
this code of my was a most fast implementation when i was needed to test something in 3 minutes as the efect looks good
(i wrote an editor for low resolution drawing when i select the
given color piece then if selected by pressing control or shift
and moving mouse i recolorise this component in fluid way -
- it ios good becouse you may see which colors fits to other colors and
some editors liek paint dont allow that this to compose some image with
fitting colors you got much much harder amount of work)
btw this is seen its written as adhoc solution becouse from optimistation point of view apssing old_color and new_color
wchich are always teh same (like passing them in whole branch
potential milion times) is nonsense - but this "branch"
(as i wouldnt call it function, its ratcher brabjc - need
that data.. and if not passing it as args i would need to make
standalone variables