public void Rotate() { var doc = new PortableDocument(); doc.AddPage(200, 200); doc.SaveState(); doc.SetColor(1, 0, 0); doc.Rotate(30); doc.DrawRectangle(50, 20, 100, 15); doc.RestoreState(); doc.DrawRectangle(50, 20, 100, 15); doc.Save(Folder + "Rotate.pdf"); }
public void DrawText_Rotated2() { var doc = new PortableDocument(); doc.AddPage(200, 200); doc.SetFont("Arial", 12); for (int i = 0; i <= 360; i += 30) { doc.SaveState(); doc.Translate(100, 100); doc.Rotate(i); doc.DrawText(0, 0, "Hello world!"); doc.RestoreState(); } doc.Save(Folder + "DrawText_Rotated2.pdf"); }