LEADTOOLS Annotations for WPF and Silverlight (Leadtools.Windows.Annotations assembly) Send comments on this topic. | Back to Introduction - All Topics | Help Version 17.0.3.31
Transform Property
See Also 
Leadtools.Windows.Annotations Namespace > AnnObject Class : Transform Property



Gets the object current transformation matrix. Supported in Silverlight, Windows Phone 7

Syntax

Visual Basic (Declaration) 
Public ReadOnly Property Transform As Matrix
Visual Basic (Usage)Copy Code
Dim instance As AnnObject
Dim value As Matrix
 
value = instance.Transform
C# 
public Matrix Transform {get;}
C++/CLI 
public:
property Matrix Transform {
   Matrix get();
}

Property Value

The current object transformation matrix. Default value is an identity matrix.

Example

Visual BasicCopy 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
C#Copy Code
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);
}
SilverlightCSharpCopy Code
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);
}
SilverlightVBCopy 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

Requirements

Target Platforms: Silverlight 3.0, Windows XP, Windows Server 2003 family, Windows Server 2008 family, Windows Vista, Windows 7, MAC OS/X (Intel Only)

See Also

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