setFlood
Top  Previous  Next

setFlood ( integer Hue, integer Luminance, integer Saturation )

Use this function to change the tolerance for the
drawFlood function. Equivalent to changing the flood settings in the Tool Preferences.

Parameters
 
Hue  
 
An integer between 0 and 255 specifying the desired threshold for hue.  
 
Luminance  
 
An integer between 0 and 255 specifying the desired threshold for luminance.  
 
Saturation  
 
An integer between 0 and 255 specifying the desired threshold for saturation.  
 
Error flags

ERR_OK  
 
The flag set if successful.  
 
ERR_FAILED  
 
The flag set if failed.  
 
Example

The following set of statements sets the flood tolerances, and then applies flooding to a sample image.  
 
hue=40  
light=140  
sat=192  
setCurDir("samples")  
loadIm (1,"sample14.iwd")  
duplicate (1,2)  
setFillColor(1,255, 96, 255)  
setFlood (hue, light, sat)  
drawFlood (2, 50, 50)  
updateim(2)