flood fills?

This is a discussion on flood fills? within the Game Programming forums, part of the General Programming Boards category; Can anyone tell me what the problems are with this Algorithm? (a lot of graphics primitives work lately) Code: PHP ...

  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, 09:58 PM
  2. Blending two or more radial gradient fills
    By pronecracker in forum Windows Programming
    Replies: 7
    Last Post: 05-28-2007, 12:39 AM
  3. Gradient fills
    By pronecracker in forum Windows Programming
    Replies: 5
    Last Post: 04-29-2007, 12:55 PM
  4. Trouble with memory flood
    By RaccoonKing in forum C++ Programming
    Replies: 8
    Last Post: 07-18-2006, 02: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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21