Returns the rotate angle of an AnnObject in degrees.
public virtual float CalculateRotateAngle()
Public Overridable Function CalculateRotateAngle() As Single
public:
virtual float CalculateRotateAngle();
The rotate angle of the AnnObject in degrees.
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 (Deprecated).
This example displays the rotate angle of an AnnObject.
using Leadtools;
using Leadtools.Annotations;
using Leadtools.Codecs;
using Leadtools.WinForms;
using Leadtools.Drawing;
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);
}
Imports Leadtools
Imports Leadtools.Annotations
Imports Leadtools.Codecs
Imports Leadtools.WinForms
Imports Leadtools.Drawing
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
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET