rotate
Top  Previous  Next

rotate ( integer Input, integer Output, floating Angle )

Use this function to rotate an image or selection at a desired angle. The function rotates the image around its central point performing the bilinear interpolation of adjacent pixels. The output frame is resized to accommodate the rotated image, the unused area to be filled with black.

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.  
 
Angle  
 
A floating variable or constant specifying the rotation angle in degrees. A positive value corresponds to the clockwise direction, negative value to the counterclockwise 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 rotated position, gradually increasing the angle of rotation:  
 
for Ang=0 to 360 step 5  
grabim (0)  
rotate (0, 1, Ang)  
next