Rotate about a locked anchor point (angle in degrees).

 

   

Syntax
 

[C#]
virtual void Rotate(double angle, double aX, double aY)

[Visual Basic]
Sub Rotate(ByVal angle As Double, ByVal aX As Double, ByVal aY As Double)

 

   

Params
 
Name Description
angle The angle to rotate in degrees.
aX The horizontal coordinate about which the rotation should be applied.
aY The vertical coordinate about which the rotation should be applied.

 

   

Notes
 

This method rotates the world space about a locked anchor point. The angle is specified in degrees anti-clockwise.

 

   

Example
 

Here we add a number of chunks of text rotated at different angles about the middle of the document.

[C#]
Doc theDoc = new Doc();
theDoc.FontSize = 48;
theDoc.TextStyle.Indent = 48;
for (int i = 1; i <= 8; i++) {
  int theAngle = i * 45;
  theDoc.Pos.String = "302 396";
  theDoc.Transform.Reset();
  theDoc.Transform.Rotate(theAngle, 302, 396);
  theDoc.AddText("Rotated " + theAngle.ToString());
}
theDoc.Save(Server.MapPath("transformrotate.pdf"));
theDoc.Clear();

[Visual Basic]
Dim theDoc As Doc = New Doc()
theDoc.FontSize = 48
theDoc.TextStyle.Indent = 48
Dim i As Integer
For i = 1 To 8
  Dim theAngle As Integer = i * 45
  theDoc.Pos.String = "302 396"
  theDoc.Transform.Reset()
  theDoc.Transform.Rotate(theAngle, 302, 396)
  theDoc.AddText("Rotated " + theAngle.ToString())
Next
theDoc.Save(Server.MapPath("transformrotate.pdf"))
theDoc.Clear()


transformrotate.pdf