LEADTOOLS Annotations for WPF and Silverlight (Leadtools.Windows.Annotations assembly)
LEAD Technologies, Inc

Transform Property (AnnObject)

Example 





Gets the object current transformation matrix. .NET support Silverlight support
Syntax
public Matrix Transform {get;}
'Declaration
 
Public ReadOnly Property Transform As Matrix
'Usage
 
Dim instance As AnnObject
Dim value As Matrix
 
value = instance.Transform
public Matrix Transform {get;}
 get_Transform(); 
public:
property Matrix Transform {
   Matrix get();
}

Property Value

The current object transformation matrix. Default value is an identity matrix.
Example
Copy CodeCopy Code  
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
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);
}
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);
}
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: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

AnnObject Class
AnnObject Members

 

 


Products | Support | Contact Us | Copyright Notices

© 2006-2012 All Rights Reserved. LEAD Technologies, Inc.