From: Emden Gansner Date: Mon, 12 Nov 2012 20:20:39 +0000 (-0500) Subject: Provide examples for the splines attribute X-Git-Tag: LAST_LIBGRAPH~32^2~273 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=65df0aa76c4b782a1c3a8aa7b3cf6019ef0741d8;p=graphviz Provide examples for the splines attribute --- diff --git a/doc/info/Makefile.am b/doc/info/Makefile.am index d96869caf..eaa69f50a 100644 --- a/doc/info/Makefile.am +++ b/doc/info/Makefile.am @@ -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) diff --git a/doc/info/attrs.html b/doc/info/attrs.html index ee0ca2d2d..8b1b4ec37 100644 --- a/doc/info/attrs.html +++ b/doc/info/attrs.html @@ -1762,7 +1762,7 @@ This field indicates which graph component uses the attribute.
splines
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 none or "", no edges are drawn at all.

(1 March 2007) The values line and spline can be used as synonyms for false and true, respectively. @@ -1775,6 +1775,24 @@ This field indicates which graph component uses the attribute.

(25 Sep 2012) The value curved specifies edges should be drawn as curved arcs. +

+ + + +
+ + + + + +
splines=none
splines="" +
splines=line
splines=false +
splines=polyline + splines=curved + splines=ortho + splines=spline
splines=true +
+

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 index 000000000..0c60aa0b4 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 index 000000000..b658f8c0f 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 index 000000000..1cd633aa3 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 index 000000000..a1563545f 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 index 000000000..6515f792b 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 index 000000000..d496f07ad Binary files /dev/null and b/doc/info/spline_spline.png differ diff --git a/doc/infosrc/Makefile.old b/doc/infosrc/Makefile.old index 2bda2928c..23851120b 100644 --- a/doc/infosrc/Makefile.old +++ b/doc/infosrc/Makefile.old @@ -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 diff --git a/doc/infosrc/attrs b/doc/infosrc/attrs index e7c4fe88e..1ddea6ef0 100644 --- a/doc/infosrc/attrs +++ b/doc/infosrc/attrs @@ -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 none or "", no edges are drawn at all.

(1 March 2007) The values line and spline can be used as synonyms for false and true, respectively. @@ -1168,6 +1168,24 @@ does not handle ports or, in dot, edge labels.

(25 Sep 2012) The value curved specifies edges should be drawn as curved arcs. +

+ + + +
+ + + + + +
splines=none
splines="" +
splines=line
splines=false +
splines=polyline + splines=curved + splines=ortho + splines=spline
splines=true +
+

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 index 000000000..46ca5ee6a --- /dev/null +++ b/doc/infosrc/mksplines.sh @@ -0,0 +1,20 @@ +#! /bin/ksh +# +# usage: mksplines.sh +# +# where spline has the form spline_.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 + diff --git a/doc/infosrc/mktapers.sh b/doc/infosrc/mktapers.sh index 76d88749d..e747f3242 100755 --- a/doc/infosrc/mktapers.sh +++ b/doc/infosrc/mktapers.sh @@ -29,6 +29,6 @@ DIR=${TAPER#${AH}_} # dir exec 3>&- dot -T$FMT $F > $TGT -# rm -f $F + rm -f $F