Thread: flood fills?

  1. #1
    Registered User
    Join Date
    Aug 2001
    Posts
    403

    flood fills?

    Can anyone tell me what the problems are with this Algorithm? (a lot of graphics primitives work lately)

    Code:
    PHP Code:
        if(|| surface->|| || surface->h)         return;     if(GetPixel(surface,x,y) == oldColor)     {         DrawPixel(surface,x,y,newColor);         DoFill(surface,x+1,y,newColor,oldColor);         DoFill(surface,x-1,y,newColor,oldColor);         DoFill(surface,x,y+1,newColor,oldColor);         DoFill(surface,x,y-1,newColor,oldColor);     } 
    or feel free to suggest new algorithims or resources on flood fills

  2. #2
    Linguistic Engineer... doubleanti's Avatar
    Join Date
    Aug 2001
    Location
    CA
    Posts
    2,459
    hasafraggin shizigishin oppashigger...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. buffer memories flood? HELP
    By TDBNDVVDSC in forum C++ Programming
    Replies: 4
    Last Post: 03-14-2008, 08:58 PM
  2. Blending two or more radial gradient fills
    By pronecracker in forum Windows Programming
    Replies: 7
    Last Post: 05-27-2007, 11:39 PM
  3. Gradient fills
    By pronecracker in forum Windows Programming
    Replies: 5
    Last Post: 04-29-2007, 11:55 AM
  4. Trouble with memory flood
    By RaccoonKing in forum C++ Programming
    Replies: 8
    Last Post: 07-18-2006, 01:04 AM
  5. Flood of errors when include .h
    By erik2004 in forum C++ Programming
    Replies: 14
    Last Post: 12-07-2002, 07:37 AM