GdPicture.NET.14
GdPicture14 Namespace / GdViewer Class / RotateAnnotations Method
The rotation angle, in degrees, determining the clockwise rotation. This parameter can only be set to 90, 180, 270; otherwise the method will fail.
Example





In This Topic
RotateAnnotations Method (GdViewer)
In This Topic
Rotates clockwise by a specified angle all GdPicture/XMP annotations contained within the currently displayed page of the document loaded in the GdViewer control. The coordinate system of the current page is used to determine the rotation direction.

Be aware that annotations are always treated relative to the currently displayed page.

Please note that you need to call the Redraw method after the successful rotation to refresh the control for displaying all applied changes.

Syntax
'Declaration
 
Public Function RotateAnnotations( _
   ByVal Angle As Integer _
) As GdPictureStatus
public GdPictureStatus RotateAnnotations( 
   int Angle
)
public function RotateAnnotations( 
    Angle: Integer
): GdPictureStatus; 
public function RotateAnnotations( 
   Angle : int
) : GdPictureStatus;
public: GdPictureStatus RotateAnnotations( 
   int Angle
) 
public:
GdPictureStatus RotateAnnotations( 
   int Angle
) 

Parameters

Angle
The rotation angle, in degrees, determining the clockwise rotation. This parameter can only be set to 90, 180, 270; otherwise the method will fail.

Return Value

A member of the GdPictureStatus enumeration. If the method has been successfully followed, then the return value is GdPictureStatus.OK. We strongly recommend always checking this status first.
Remarks
Just to remind you, that you need to call the Redraw method to display all applied changes.

The method only handles GdPicture/XMP annotations as well.

Example
How to rotate all annotations on the current page clockwise by 90 degrees.
'We assume that the GdViewer1 control has been properly integrated
'and your document has been properly displayed as well.
Dim annotCount As Integer = GdViewer1.GetAnnotationCount()
If annotCount > 0 Then
    If GdViewer1.RotateAnnotations(90) = GdPictureStatus.OK Then GdViewer1.Redraw()
End If
//We assume that the GdViewer1 control has been properly integrated.
//and your document has been properly displayed as well.
int annotCount = GdViewer1.GetAnnotationCount();
if (annotCount > 0)
{
    if (GdViewer1.RotateAnnotations(90) == GdPictureStatus.OK)
        GdViewer1.Redraw();
}
See Also