Rotate
Top  Previous  Next

Description

Rotates the image at the specified angle. The following angle values are allowed:

0 -    No image rotation is performed  
90 -    The image is rotated 90° conunterclockwise  
180 -    The image is rotated 180°  
270 -    The image is rotated -90° clockwise  
 
Syntax

[VB]
objActiveDcam.Rotate [= Value]


[C/C++]
HRESULT get_Rotate( long *pRotate );
HRESULT put_Rotate( long Rotate );



Data Type
[VB]

Long


Parameters
[C/C++]

pRotate [out,retval]  
Pointer to the rotational angle.  
Rotate [in]  
The rotational angle to be set.  


Return Values


S_OK  
Success  
E_FAIL  
Failure.  
 

Example


This VB example demonstrates the use of a combo box for rotating the live video:

Private Sub Form_Load()  
ActiveDcam1.Acquire = True  
Combo1.AddItem ("0°")  
Combo1.AddItem ("90°")  
Combo1.AddItem ("180°")  
Combo1.AddItem ("270°")  
Combo1.ListIndex = 0  
End Sub  
 
Private Sub Combo1_Click()  
ActiveDcam1.Rotate = Combo1.ListIndex * 90  
End Sub  

Remarks


Image rotation affects the way the video is displayed in the control window as well as actual order of pixels in the image frame. If the rotation angle is different from zero, the data returned by GetImageData and other data access methods will be rotated as well.

Note that the Flip operation has precedence over rotation. If both Flip and Rotate properties are non-zero, the frame will be flipped first and the resulting image rotated.

If the value of the angle is different from 0, 90, 180 and 270, it will be substituted with the nearest allowable value.