Leadtools.Annotations Requires Document/Medical product license | Send comments on this topic. | Back to Introduction - All Topics | Help Version 15.10.31
CalculateRotateAngle Method
See Also  Example
Leadtools.Annotations Namespace > AnnObject Class : CalculateRotateAngle Method




Returns the rotate angle of an AnnObject in degrees.

Syntax

Visual Basic (Declaration) 
Public Overridable Function CalculateRotateAngle() As Single
Visual Basic (Usage)Copy Code
Dim instance As AnnObject
Dim value As Single
 
value = instance.CalculateRotateAngle()
C# 
public virtual float CalculateRotateAngle()
Managed Extensions for C++ 
public: virtual float CalculateRotateAngle(); 
C++/CLI 
public:
virtual float CalculateRotateAngle(); 

Return Value

The rotate angle of the AnnObject in degrees.

Example

This example displays the rotate angle of an AnnObject.

Visual BasicCopy Code
Public Sub AnnObject_CalculateRotateAngle(ByVal obj As AnnObject)
   Dim angle As Single = obj.CalculateRotateAngle()
   Dim s As String = String.Format("The selected {0} has a rotate angle of {1}", obj.GetType().ToString(), angle)
   MessageBox.Show(s)
End Sub
C#Copy Code
public void AnnObject_CalculateRotateAngle(AnnObject obj) 

   float angle = obj.CalculateRotateAngle(); 
   string s = string.Format("The selected {0} has a rotate angle of {1}", obj.GetType().ToString(), angle); 
   MessageBox.Show(s); 
}

Remarks

The rotate angle returned is formed by the object and the horizontal. A positive value represents a clockwise rotation, and a negative value represents a counter-clockwise rotation. Many objects do not have a rotate angle (i.e. AnnPolylineObject) and will therefore return 0 degrees. For rectangular objects (objects derived from AnnRectangleObject), the angle computed is formed by the top edge of the object and the horizontal. For more information, refer to New Annotation Features of Version 14.5.

Requirements

Target Platforms: Microsoft .NET Framework 2.0, Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Leadtools.Annotations requires a Document or Medical toolkit license and unlock key. For more information, refer to: Raster Pro/Document/Medical Features