Leadtools.Windows.Annotations Requires Document/Medical license. | Send comments on this topic. | Back to Introduction - All Topics | Help Version 16.5.9.25
Origin Property
See Also  Example
Leadtools.Windows.Annotations Namespace > AnnObjectBase Class : Origin Property





Gets the logical origin of this AnnObjectBase.

Syntax

Visual Basic (Declaration) 
Public Overridable ReadOnly Property Origin As Point
Visual Basic (Usage)Copy Code
Dim instance As AnnObjectBase
Dim value As Point
 
value = instance.Origin
C# 
public virtual Point Origin {get;}
C++/CLI 
public:
virtual property Point Origin {
   Point get();
}
XAML Syntax 
You cannot use this property in XAML.
XAML Syntax 
You cannot use this property in XAML.

Return Value

The logical origin of this AnnObjectBase.

Example

Visual BasicCopy Code
Private Sub AnnObject_RenderTransform(ByVal obj As AnnObjectBase)
   ' show the matrix
   ShowMatrix(obj.RenderTransform.Value)
   obj.Translate(2, 3)
   ShowMatrix(obj.RenderTransform.Value)
   obj.Scale(1.5F, 1.5F, obj.Origin)
   ShowMatrix(obj.RenderTransform.Value)
   obj.Rotate(45, obj.Origin)
   ShowMatrix(obj.RenderTransform.Value)
   obj.ResetTransform()
   ShowMatrix(obj.RenderTransform.Value)
End Sub


Private Sub ShowMatrix(ByVal mat As Matrix)
   Console.Write("{0}, ", mat.M11)
   Console.Write("{0}, ", mat.M12)
   Console.Write("{0}, ", mat.M21)
   Console.Write("{0}, ", mat.M22)
   Console.Write("{0}, ", mat.OffsetX)
   Console.Write("{0}, ", mat.OffsetY)
End Sub
C#Copy Code
private void AnnObject_RenderTransform(AnnObjectBase obj) 

   // show the matrix 
   ShowMatrix(obj.RenderTransform.Value); 
   obj.Translate(2, 3); 
   ShowMatrix(obj.RenderTransform.Value); 
   obj.Scale(1.5F, 1.5F, obj.Origin); 
   ShowMatrix(obj.RenderTransform.Value); 
   obj.Rotate(45, obj.Origin); 
   ShowMatrix(obj.RenderTransform.Value); 
   obj.ResetTransform(); 
   ShowMatrix(obj.RenderTransform.Value); 

 
 
private void ShowMatrix(Matrix mat) 

   Console.Write("{0}, ", mat.M11); 
   Console.Write("{0}, ", mat.M12); 
   Console.Write("{0}, ", mat.M21); 
   Console.Write("{0}, ", mat.M22); 
   Console.Write("{0}, ", mat.OffsetX); 
   Console.Write("{0}, ", mat.OffsetY); 
}

Remarks

(Read only) This method returns the logical origin of this AnnObjectBase. This value is calculated by returning the origin of the AnnObjectBase.DefiningGeometry value. You can use this origin to AnnObjectBase.Rotate or AnnObjectBase.Scale this object around itself.

For more information, refer to Low-Level Coordinate System for WPF Annotations.

Requirements

Target Platforms: Microsoft .NET Framework 3.0, Windows XP, Windows Vista, and Windows Server 2003 family

See Also

Origin requires a Document/Medical product license and unlock key. For more information, refer to: Imaging Pro/Document/Medical Features and Unlocking Special LEAD Features.