]> granicus.if.org Git - graphviz/commitdiff
Provide examples for the splines attribute
authorEmden Gansner <erg@research.att.com>
Mon, 12 Nov 2012 20:20:39 +0000 (15:20 -0500)
committerEmden Gansner <erg@research.att.com>
Mon, 12 Nov 2012 20:20:39 +0000 (15:20 -0500)
12 files changed:
doc/info/Makefile.am
doc/info/attrs.html
doc/info/spline_curved.png [new file with mode: 0644]
doc/info/spline_line.png [new file with mode: 0644]
doc/info/spline_none.png [new file with mode: 0644]
doc/info/spline_ortho.png [new file with mode: 0644]
doc/info/spline_polyline.png [new file with mode: 0644]
doc/info/spline_spline.png [new file with mode: 0644]
doc/infosrc/Makefile.old
doc/infosrc/attrs
doc/infosrc/mksplines.sh [new file with mode: 0755]
doc/infosrc/mktapers.sh

index d96869caf57678623348dae73000fd58559b4537..eaa69f50ae6632cee6fa8602f128b94464973203 100644 (file)
@@ -35,6 +35,8 @@ html_DATA = attrs.html colors.html command.html \
   n_bold.png n_dashed.png n_diagonals.png n_dotted.png n_filled.png \
   n_rounded.png n_solid.png n_striped.png n_wedged.png \
   none_back.png none_both.png none_forward.png none_none.png \
-  normal_back.png normal_both.png normal_forward.png normal_none.png
+  normal_back.png normal_both.png normal_forward.png normal_none.png \
+  spline_curved.png spline_none.png spline_polyline.png \
+  spline_line.png spline_ortho.png spline_spline.png
 
 EXTRA_DIST = $(html_DATA)
index ee0ca2d2d64e088e89c726893d0fd8be2e00561a..8b1b4ec374288945cf9505458f5c2bf26d740df2 100644 (file)
@@ -1762,7 +1762,7 @@ This field indicates which graph component uses the attribute.
 <DT><A NAME=d:splines HREF=#a:splines><STRONG>splines</STRONG></A>
 <DD>  Controls how, and if, edges are represented. If true, edges are drawn as
   splines routed around nodes; if false, edges are drawn as line segments.
-  If set to "", no edges are drawn at all.
+  If set to <tt>none</tt> or "", no edges are drawn at all.
   <P>
   (1 March 2007) The values <TT>line</TT> and <TT>spline</TT> can be
   used as synonyms for <TT>false</TT> and <TT>true</TT>, respectively.
@@ -1775,6 +1775,24 @@ This field indicates which graph component uses the attribute.
   <P>
   (25 Sep 2012) The value <TT>curved</TT> specifies edges should be
   drawn as curved arcs.
+  <P>
+  <TABLE>
+  <TR><TD><IMG WIDTH="200" VSPACE="10" HSPACE="10" SRC="spline_none.png">
+      <TD><IMG WIDTH="200" VSPACE="10" HSPACE="10" SRC="spline_line.png">
+      <TD><IMG WIDTH="200" VSPACE="10" HSPACE="10" SRC="spline_polyline.png">
+      <TD><IMG WIDTH="200" VSPACE="10" HSPACE="10" SRC="spline_curved.png">
+      <TD><IMG WIDTH="200" VSPACE="10" HSPACE="10" SRC="spline_ortho.png">
+      <TD><IMG WIDTH="200" VSPACE="10" HSPACE="10" SRC="spline_spline.png">
+  </TR>
+  <TR><TD ALIGN="center">splines=none<BR>splines=""
+      <TD ALIGN="center">splines=line<BR>splines=false
+      <TD ALIGN="center">splines=polyline
+      <TD ALIGN="center">splines=curved
+      <TD ALIGN="center">splines=ortho
+      <TD ALIGN="center">splines=spline<BR>splines=true
+  </TR>
+  </TABLE>
+  
   <P>
   By default, the attribute is unset. How this is interpreted depends on
   the layout. For dot, the default is to draw edges as splines. For all
diff --git a/doc/info/spline_curved.png b/doc/info/spline_curved.png
new file mode 100644 (file)
index 0000000..0c60aa0
Binary files /dev/null and b/doc/info/spline_curved.png differ
diff --git a/doc/info/spline_line.png b/doc/info/spline_line.png
new file mode 100644 (file)
index 0000000..b658f8c
Binary files /dev/null and b/doc/info/spline_line.png differ
diff --git a/doc/info/spline_none.png b/doc/info/spline_none.png
new file mode 100644 (file)
index 0000000..1cd633a
Binary files /dev/null and b/doc/info/spline_none.png differ
diff --git a/doc/info/spline_ortho.png b/doc/info/spline_ortho.png
new file mode 100644 (file)
index 0000000..a156354
Binary files /dev/null and b/doc/info/spline_ortho.png differ
diff --git a/doc/info/spline_polyline.png b/doc/info/spline_polyline.png
new file mode 100644 (file)
index 0000000..6515f79
Binary files /dev/null and b/doc/info/spline_polyline.png differ
diff --git a/doc/info/spline_spline.png b/doc/info/spline_spline.png
new file mode 100644 (file)
index 0000000..d496f07
Binary files /dev/null and b/doc/info/spline_spline.png differ
index 2bda2928cbb8385a9c19bd6377bdfd9c617b2d8d..23851120b345ff8d89bd18dfbaedf176a3856e17 100644 (file)
@@ -3,7 +3,7 @@
 #
 # Required tools: cc, dot, awk, ksh, yacc, gs.
 #  gs and awk are used in ps_to_jpg.sh
-#  dot is used in mkarrows.sh, mkshapes.sh, mkstyles.sh, mktapers.sh
+#  dot is used in mkarrows.sh, mkshapes.sh, mkstyles.sh, mktapers.sh, mksplines.sh
 #  ps_to_png.sh and other make rules rely on netpbm tools 
 #  and ps2raster, which is part of the GMT library.
 #
@@ -42,7 +42,9 @@ STYLEPNG = n_solid.png n_dashed.png n_dotted.png n_bold.png n_filled.png n_round
 TAPERPNG = normal_forward.png normal_back.png normal_both.png normal_none.png \
            none_forward.png none_back.png none_both.png none_none.png
 
-MPNG = plugins.png sdlshapes.png $(GRADPNG) $(STYLEPNG) $(TAPERPNG)
+SPLINEPNG = spline_none.png spline_line.png spline_spline.png spline_ortho.png spline_curved.png spline_polyline.png
+
+MPNG = plugins.png sdlshapes.png $(GRADPNG) $(STYLEPNG) $(TAPERPNG) $(SPLINEPNG)
 
 SGIF = Mcircle.gif Mdiamond.gif Msquare.gif box.gif \
       circle.gif diamond.gif doublecircle.gif \
@@ -195,6 +197,9 @@ $(STYLEPNG) : mkstyles.sh
 $(TAPERPNG) : mktapers.sh
        ./mktapers.sh $@
 
+$(SPLINEPNG) : mksplines.sh
+       ./mksplines.sh $@
+
 clean :
        rm -f mklang sdlshapes.ps sdlshapes.ppm html.html
 
index e7c4fe88eeb86922b08b9e900e460723bb794a46..1ddea6ef0a293cf3530f91d5e57e242275a481b8 100644 (file)
@@ -1155,7 +1155,7 @@ insertion order among the components, with smaller values inserted first.
 :splines:G:bool/string;
 Controls how, and if, edges are represented. If true, edges are drawn as
 splines routed around nodes; if false, edges are drawn as line segments.
-If set to "", no edges are drawn at all.
+If set to <tt>none</tt> or "", no edges are drawn at all.
 <P>
 (1 March 2007) The values <TT>line</TT> and <TT>spline</TT> can be
 used as synonyms for <TT>false</TT> and <TT>true</TT>, respectively.
@@ -1168,6 +1168,24 @@ does not handle ports or, in dot, edge labels.
 <P>
 (25 Sep 2012) The value <TT>curved</TT> specifies edges should be
 drawn as curved arcs.
+<P>
+<TABLE>
+<TR><TD><IMG WIDTH="200" VSPACE="10" HSPACE="10" SRC="spline_none.png">
+    <TD><IMG WIDTH="200" VSPACE="10" HSPACE="10" SRC="spline_line.png">
+    <TD><IMG WIDTH="200" VSPACE="10" HSPACE="10" SRC="spline_polyline.png">
+    <TD><IMG WIDTH="200" VSPACE="10" HSPACE="10" SRC="spline_curved.png">
+    <TD><IMG WIDTH="200" VSPACE="10" HSPACE="10" SRC="spline_ortho.png">
+    <TD><IMG WIDTH="200" VSPACE="10" HSPACE="10" SRC="spline_spline.png">
+</TR>
+<TR><TD ALIGN="center">splines=none<BR>splines=""
+    <TD ALIGN="center">splines=line<BR>splines=false
+    <TD ALIGN="center">splines=polyline
+    <TD ALIGN="center">splines=curved
+    <TD ALIGN="center">splines=ortho
+    <TD ALIGN="center">splines=spline<BR>splines=true
+</TR>
+</TABLE>
+
 <P>
 By default, the attribute is unset. How this is interpreted depends on
 the layout. For dot, the default is to draw edges as splines. For all
diff --git a/doc/infosrc/mksplines.sh b/doc/infosrc/mksplines.sh
new file mode 100755 (executable)
index 0000000..46ca5ee
--- /dev/null
@@ -0,0 +1,20 @@
+#! /bin/ksh
+#
+# usage: mksplines.sh <spline>
+#
+# where spline has the form spline_<splinesattr>.fmt
+# where .fmt gives the desired output format.
+
+if (( $# == 0 ))
+then
+  echo "mksplines: missing splines name argument"
+  exit 1
+fi
+
+TGT=$1                  # spline_kind.fmt
+SPLINE=${1%.*}          # spline_kind
+FMT=${1#$SPLINE.}       # fmt
+KIND=${SPLINE#spline_}  # kind
+
+sfdp -T$FMT -Gviewport=300,300,1,40 -Goverlap=false -Gsplines=$KIND ../../graphs/undirected/ngk10_4.gv > $TGT
+
index 76d88749d47b9603f0ac813a982348b9790f5d59..e747f324232e38f60f3c1109b8257d706f89b9dd 100755 (executable)
@@ -29,6 +29,6 @@ DIR=${TAPER#${AH}_}  # dir
     exec 3>&-
 
     dot -T$FMT $F > $TGT
-#    rm -f $F
+    rm -f $F