getImPos
Top  Previous  Next

getImPos ( integer Image, integer& X0, integer& Y0 [, integer& Sx, integer& Sy ] )

Use this function to retrieve the position and size of an image frame in the workspace.

Parameters
 
Image  
 
An integer between 1 and 99 specifying the number of the frame.  
 
X0, Y0  
 
Integer variables that return the coordinates of the top left corner of the frame relative to the top left corner of ImageWarp's client area.  
 
Sx, Sy  
 
Optional integers variables that return the width and height of the frame.  
 
Error flags

ERR_OK  
 
The flag set if successful.  
 
ERR_FAILED  
 
The flag set if failed.  
 
Example
 
This set of statements retrieves the position and size of an image frame and prints the information in the terminal window:  
 
setCurDir("samples")  
loadIm (1,"sample14.iwd")  
getImPos (1, x0, y0, sx, sy )  
print "x0=", x0  
print "y0=", y0  
print "sx=", sx  
print "sy=", sy