RE: Win32Lib API Floodfill?

new topic     » goto parent     » topic index » view thread      » older message » newer message

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/

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu