]> granicus.if.org Git - graphviz/commitdiff
add script to generate arrow shapes
authorellson <devnull@localhost>
Sun, 2 Mar 2008 16:50:43 +0000 (16:50 +0000)
committerellson <devnull@localhost>
Sun, 2 Mar 2008 16:50:43 +0000 (16:50 +0000)
regenerate arrow shapes using recent dot with antialing

doc/info/arrowgen.tcl [new file with mode: 0755]

diff --git a/doc/info/arrowgen.tcl b/doc/info/arrowgen.tcl
new file mode 100755 (executable)
index 0000000..a2c95dd
--- /dev/null
@@ -0,0 +1,92 @@
+#!/usr/bin/tclsh
+
+set arrows {
+    box
+    crow
+    diamond
+    dot
+    inv
+    lbox
+    lcrow
+    ldiamond
+    linv
+    lnormal
+    ltee
+    lvee
+    none
+    normal
+    obox
+    odiamond
+    odot
+    oinv
+    olbox
+    oldiamond
+    olinv
+    olnormal
+    onormal
+    orbox
+    ordiamond
+    orinv
+    ornormal
+    rbox
+    rcrow
+    rdiamond
+    rinv
+    rnormal
+    rtee
+    rvee
+    tee
+    vee
+}
+
+set arrowexamples {
+    box
+    crow
+    diamond
+    dot
+    ediamond
+    empty
+    forward
+    halfopen
+    inv
+    invdot
+    invempty
+    invodot
+    lteeoldiamond
+    nohead
+    none
+    normal
+    obox
+    odiamond
+    odot
+    open
+    tee
+}
+
+foreach {arrow} $arrows {
+       set f [open aa_$arrow.dot w]
+       puts $f "digraph G \{"
+       puts $f "graph \[pad=\"0.05\" rankdir=LR\]"
+       puts $f "a \[label=\"\" shape=point\]"
+       puts $f "b \[label=\"\" shape=none width=0 height=0\]"
+       puts $f "a -> b \[arrowhead=$arrow\]"
+       puts $f "\}"
+       close $f
+       exec dot -Tgif aa_$arrow.dot -o aa_$arrow.gif
+
+       file delete aa_$arrow.dot
+}
+
+foreach {arrow} $arrowexamples {
+       set f [open a_$arrow.dot w]
+       puts $f "digraph G \{"
+       puts $f "graph \[pad=\"0.05\" rankdir=LR\]"
+       puts $f "a \[label=\"\" shape=point\]"
+       puts $f "b \[label=\"\"]"
+       puts $f "a -> b \[arrowhead=$arrow\]"
+       puts $f "\}"
+       close $f
+       exec dot -Tgif a_$arrow.dot -o a_$arrow.gif
+
+       file delete a_$arrow.dot
+}