XTransform Reset Function. Reset to the identity. ABCpdf .NET PDF Library.

ABCpdf .net

 
   

Reset to the identity.

 

   
Syntax  

[C#]
void Reset()

[Visual Basic]
Sub Reset()

 

   

Params
 
Name Description
None  

 

   

Notes
 

This method resets the transform to it's original state. This state is known as the identity and indicates that no transformation will be applied.

 

   

Example
 

Here we add some text rotated at 60 degrees around the middle of the document. We then reset the transform and draw some more text. This text is drawn with no rotation because the transform has been reset.

[C#]
Doc theDoc = new Doc();
theDoc.Rect.Inset(10, 10);
theDoc.FontSize = 96;
theDoc.Transform.Rotate(60, 302, 396);
theDoc.Pos.String = "302 396";
theDoc.AddText("Angled");
theDoc.FrameRect();
theDoc.Transform.Reset();
theDoc.Pos.String = "302 396";
theDoc.AddText("Reset");
theDoc.FrameRect();
theDoc.Save(Server.MapPath("transformreset.pdf"));
theDoc.Clear();

[Visual Basic]
Dim theDoc As Doc = New Doc()
theDoc.Rect.Inset(10, 10)
theDoc.FontSize = 96
theDoc.Transform.Rotate(60, 302, 396)
theDoc.Pos.String = "302 396"
theDoc.AddText("Angled")
theDoc.FrameRect()
theDoc.Transform.Reset()
theDoc.Pos.String = "302 396"
theDoc.AddText("Reset")
theDoc.FrameRect()
theDoc.Save(Server.MapPath("transformreset.pdf"))
theDoc.Clear()


transformreset.pdf