Browse code

Show dotted lines in xdot (by djs52uk, issue 50).

José Fonseca authored on 13/02/2011 23:42:45
Showing 1 changed files

  • xdot.py index f6b3c0b..e91064b 100755
... ...
@@ -597,7 +597,7 @@ class XDotAttrParser:
597 597
                     lw = style.split("(")[1].split(")")[0]
598 598
                     lw = float(lw)
599 599
                     self.handle_linewidth(lw)
600
-                elif style in ("solid", "dashed"):
600
+                elif style in ("solid", "dashed", "dotted"):
601 601
                     self.handle_linestyle(style)
602 602
             elif op == "F":
603 603
                 size = s.read_float()
... ...
@@ -663,6 +663,8 @@ class XDotAttrParser:
663 663
             self.pen.dash = ()
664 664
         elif style == "dashed":
665 665
             self.pen.dash = (6, )       # 6pt on, 6pt off
666
+        elif style == "dotted":
667
+            self.pen.dash = (2, 4)       # 2pt on, 4pt off
666 668
 
667 669
     def handle_font(self, size, name):
668 670
         self.pen.fontsize = size