LEADTOOLS Annotations for WPF and Silverlight (Leadtools.Windows.Annotations assembly)

Origin Property (AnnObject)

Show in webframe
Example 





Gets the logical origin of this AnnObject.
Syntax
public virtual Point Origin {get;}
'Declaration
 
Public Overridable ReadOnly Property Origin As Point
'Usage
 
Dim instance As AnnObject
Dim value As Point
 
value = instance.Origin

            

            
public:
virtual property Point Origin {
   Point get();
}

Property Value

The logical origin of this AnnObject.
Remarks
This method returns the logical origin of this AnnObject. This value is calculated by returning the origin of the DefiningGeometry value. You can use this origin to Rotate or Scale this object around itself.

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

Example
Copy Code  
Imports Leadtools.Windows.Controls
Imports Leadtools.Windows.Annotations

Private Sub AnnObject_Transform(ByVal obj As AnnObject)
   ' show the matrix
   ShowMatrix(obj.Transform)
   obj.Translate(2, 3)
   ShowMatrix(obj.Transform)
   obj.Scale(1.5F, 1.5F, obj.Origin)
   ShowMatrix(obj.Transform)
   obj.Rotate(45, obj.Origin)
   ShowMatrix(obj.Transform)
   obj.ResetTransform()
   ShowMatrix(obj.Transform)
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
using Leadtools.Windows.Controls;
using Leadtools.Windows.Annotations;
using Leadtools.Demos;
using Leadtools.Help;

private void AnnObject_Transform(AnnObject obj)
{
   // show the matrix
   ShowMatrix(obj.Transform);
   obj.Translate(2, 3);
   ShowMatrix(obj.Transform);
   obj.Scale(1.5F, 1.5F, obj.Origin);
   ShowMatrix(obj.Transform);
   obj.Rotate(45, obj.Origin);
   ShowMatrix(obj.Transform);
   obj.ResetTransform();
   ShowMatrix(obj.Transform);
}

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);
}
using Leadtools.Windows.Controls;
using Leadtools.Windows.Annotations;
using Leadtools.Examples;

private void AnnObject_Transform(AnnObject obj)
{
   // show the matrix
   ShowMatrix(obj.Transform);
   obj.Translate(2, 3);
   ShowMatrix(obj.Transform);
   obj.Scale(1.5F, 1.5F, obj.Origin);
   ShowMatrix(obj.Transform);
   obj.Rotate(45, obj.Origin);
   ShowMatrix(obj.Transform);
   obj.ResetTransform();
   ShowMatrix(obj.Transform);
}

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);
}
Imports Leadtools.Windows.Controls
Imports Leadtools.Windows.Annotations

Private Sub AnnObject_Transform(ByVal obj As AnnObject)
   ' show the matrix
   ShowMatrix(obj.Transform)
   obj.Translate(2, 3)
   ShowMatrix(obj.Transform)
   obj.Scale(1.5F, 1.5F, obj.Origin)
   ShowMatrix(obj.Transform)
   obj.Rotate(45, obj.Origin)
   ShowMatrix(obj.Transform)
   obj.ResetTransform()
   ShowMatrix(obj.Transform)
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
Requirements

Target Platforms

See Also

Reference

AnnObject Class
AnnObject Members

 

 


Products | Support | Contact Us | Copyright Notices
© 2006-2014 All Rights Reserved. LEAD Technologies, Inc.