setPencil
Top  Previous  Next

setPencil ( integer Width )

Use this function to set the width of the pencil used in drawPencil. Equivalent to changing the pencil width in the Tool Preferences.

Parameters
 
Width  
 
A positive integer specifying the desired pencil width.  
 
Error flags

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

The following set of statements sets pencil width to 5, and then draws a point on a sample image:  
 
setCurDir("samples")  
loadIm (1,"sample14.iwd")  
setPencil (5)  
drawPencil (1, 100, 100)  
redraw(1)