Diagram.py: add some example calls to test drawing rectangles
authorAntonio Ospite <ao2@ao2.it>
Fri, 12 Jun 2015 20:30:07 +0000 (22:30 +0200)
committerAntonio Ospite <ao2@ao2.it>
Fri, 12 Jun 2015 20:38:04 +0000 (22:38 +0200)
Diagram.py

index 8cb41ad..fa35d32 100755 (executable)
@@ -282,4 +282,10 @@ if __name__ == "__main__":
 
     diagram.draw_line(0, y, 400, y, [0, 0, 1, 0.2])
 
+    diagram.draw_rect(40, 40, 300, 100, stroke=True)
+    diagram.draw_rect(40, 40, 300, 100, pi / 30, stroke=True)
+
+    diagram.draw_rect(40, 250, 300, 100, stroke=True)
+    diagram.draw_rect_from_center(40 + 150, 250 + 50, 300, 100, theta=pi / 40, stroke=True, stroke_color=[1, 0, 0], fill=False)
+
     diagram.show()