←Select platform

Transform Property

Summary

Gets the object current transformation matrix.

Syntax

C#
VB
C++
public Matrix Transform { get; } 
  
Public ReadOnly Property Transform As Matrix 
public: 
property Matrix Transform { 
   Matrix get(); 
} 

Property Value

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

Example

C#
VB
Silverlight C#
Silverlight VB
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); 
} 
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.Examples; 
//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); 
} 
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

Help Version 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Windows.Annotations Assembly