RE: Win32Lib API Floodfill?
- Posted by cklester <cklester at yahoo.com> Aug 06, 2004
- 380 views
cklester wrote: > > Brian, should this work on pixmaps? It doesn't seem to be working > for me on those. I can get it to fill a window, though... Update. Here's what I have... a pixmap with two colors on it, either black or pink. If i click on a pink area, it will fill with black. if i click on a black area, it will not fill with pink. Why?!?! :) Here's the relevant code... I don't think it's wrong. x = pos[1] -- get mouse position y = pos[2] c = getPixel(pixMask,x,y) -- check color if c = Black then c = Pink -- paint pink on black else c = Black -- paint black on pink end if floodFillSurface(pixMask,x,y,c) draw_Bitmap() -=ck "Programming in a state of EUPHORIA." http://www.cklester.com/euphoria/