locked
Fill Color in Irregular Regions RRS feed

  • Question

  • User-725550490 posted
    Hi, Basically, I've put a map (in PNG format) on my ASP.NET page (using VB language). The map has district boundaries delineated with GREEN color lines. The land is in WHITE color. I want to fill in different colors in the different land regions bounded by the GREEN color boundaries. I don't know what function I can call to achieve this? Even Window's Paint tool has this function. But what's the algorithm I can use if there is no built-in function available in ASP.NET. Thanks in advance, Jack Ling
    Wednesday, March 23, 2005 10:05 PM

All replies

  • User-680512290 posted
    Jack The algorithm you are speaking about is called a flood fill. Here is a related article that might help. The code is c# tho - and it uses SetPixel which is notoriously slow. http://www.codeproject.com/gdi/QuickFill.asp HTH GW
    Thursday, March 24, 2005 7:13 AM