🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #15440

Re: floodfill ?

#15440
From: Claude Glauser
Date: Sat, 12 Jun 1999 00:00
31 lines
1278 bytes
Well, I have the same Problem. I would like to implement
to FloodFill algorithm myself. The Problem is:
How can I access a partuculiar Pixel ?
How can I find out the Color of Pixel[100,100]
for example ? There is no mehtod to do this in
class Graphics !


For C++ Builder, the algorithm to fill a black Shape with balck:

void __fastcall TForm1::FloodFill(int x, int y)
{
 if(!((int)Canvas->Pixels[x][y]))
     return;
    else
    {
        Canvas->Pixels[x][y] = (TColor) 0x0;
        FloodFill(x,y-1);
        FloodFill(x+1,y);
        FloodFill(x,y+1);
        FloodFill(x-1,y);
    }
}

Christophe wrote:

> Hi
>
> Where can I find a floodfill algorithm written in Java ?
>
> Thanks.
Technical Details
Message-ID: <37627F5D.64252A56@smile.ch>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <7jtt81$dbb6@forums.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,2d69d13a2dca9a50
X-Google-Attributes: gidf74b3,public
From: Claude Glauser <claude.glauser@smile.ch>
Subject: Re: floodfill ?
Date: 1999/06/12
Message-ID: <37627F5D.64252A56@smile.ch>
X-Deja-AN: 488805219
Content-Transfer-Encoding: 7bit
References: <7jtt81$dbb6@forums.borland.com>
Content-Type: text/plain; charset=us-ascii
Organization: Another Netscape Collabra Server User
Mime-Version: 1.0
Reply-To: claude.glauser@smile.ch
Newsgroups: borland.public.jbuilder.java.language