translate
Top  Previous  Next

translate ( integer Input, integer Output, integer Dx, integer Dy )

Use this function to translate an image or selection horizontally or vertically.

Parameters
 
Input  
 
An integer between 0 and 116 specifying the input image frame number. A value of 0 represents the DMA memory buffer of the video device. Values in the range of 100-116 correspond to hidden frames.  
 
Output  
 
An integer between 1 and 116 specifying the output image frame number. Values in the range of 100-116 correspond to hidden frames.  
 
Dx  
 
An integer specifying the distance in pixels to translate the image horizontally: A positive value corresponds to a rightward direction, negative value to a leftward direction.  
 
Dy  
 
An integer specifying the distance in pixels to translate the image vertically: A positive value corresponds to a downward direction, negative value to an upward direction.  
 
Error flags

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

Example

This set of statements will continuously grab an image and display it in a translated state, gradually increasing translation distances in both directions:  
 
for Dist=0 to 1000 step 5  
grabim (0)  
translate (0, 1, Dist, Dist*2)  
next