RE: Win32Lib API Floodfill?

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

Derek Parnell wrote:
> I haven't looked at Brian's code but I guess its a wrapper for the 
> ExtFloodFill API call. In which case, the 'c' value is not the color
> you WANT to flood that area with, but the color which you want to change. 

Here's his function:

global procedure floodFillSurface( integer id, integer x, integer y, atom
newColor )
  atom hdc, col
  col = getPixel( id, x, y )
  setPenColor( id, newColor )
  hdc = getDC( id )
  createBrush( id, 1, hdc )
  w32Proc( xExtFloodFill, { hdc, x, y, col, FLOODFILLSURFACE } )
  releaseDC( id )
end procedure

That should work for how I was using it, and it does when I'm
painting on pink, but not when painting on black. Weird!

-=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