From: Emden Gansner Date: Wed, 31 Oct 2012 20:04:05 +0000 (-0400) Subject: Update documentation to note xlp, head_lp and tail_lp attributes; X-Git-Tag: LAST_LIBGRAPH~32^2~281^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=eac7f4767d469fe9cee0404413b1a9938ef816f9;p=graphviz Update documentation to note xlp, head_lp and tail_lp attributes; add more details and examples concerning style attribute and style=tapered; describe style=wedged and style=striped. --- diff --git a/doc/info/attrs.html b/doc/info/attrs.html index e27868adb..8494add8d 100644 --- a/doc/info/attrs.html +++ b/doc/info/attrs.html @@ -196,6 +196,9 @@ This field indicates which graph component uses the attribute. headURL EescString ""svg, map only + head_lp +Epoint +write only headclip Ebool true @@ -456,6 +459,9 @@ This field indicates which graph component uses the attribute. tailURL EescString ""svg, map only + tail_lp +Epoint +write only tailclip Ebool true @@ -498,6 +504,9 @@ This field indicates which graph component uses the attribute. xlabel ENlblString "" + xlp +NEpoint +write only z Ndouble0.0-MAXFLOAT
-1000 @@ -881,6 +890,10 @@ This field indicates which graph component uses the attribute. URL value. See limitation. +
head_lp +
Position of an edge's head label, in points. + The position indicates the center of the label. +
headclip
If true, the head of an edge is clipped to the boundary of the head node; otherwise, the end of the edge goes to the center of the node, or the @@ -1789,6 +1802,10 @@ This field indicates which graph component uses the attribute. URL value. See limitation. +
tail_lp +
Position of an edge's tail label, in points. + The position indicates the center of the label. +
tailclip
If true, the tail of an edge is clipped to the boundary of the tail node; otherwise, the end of the edge goes to the center of the node, or the @@ -1901,6 +1918,10 @@ This field indicates which graph component uses the attribute. so that they do not overlap any node or label. This means it may not be possible to place all of them. To force placing all of them, use the forcelabels attribute. +
xlp +
Position of an exterior label, in points. + The position indicates the center of the label. +
z
Deprecated:Use pos attribute, along with dimen and/or dim @@ -2031,8 +2052,10 @@ enclosed in the parentheses, (...)+ indicates 1 or more, and style to invis.
colorList -
A colon-separated list of color values: C(:C)* - where each C is a color value. +
A colon-separated list of weighted color values: WC(:WC)* + where each WC has the form C(;F)? with C a color value + and the optional F a floating-point number, 0 ≤ F ≤ 1. The sum of the + floating-point numbers in a colorList must sum to at most 1.

Depending on the related attribute and graph object, two colors may specify a gradient fill. The following table shows some variations of the yellow:blue color list depending on the @@ -2313,10 +2336,59 @@ enclosed in the parentheses, (...)+ indicates 1 or more, and At present, the recognized style names are "dashed", "dotted", "solid", "invis" and "bold" for nodes and edges, "tapered" for edges only, - and "filled", "diagonals" and "rounded" for nodes only. - The styles "filled" and "rounded" are recognized for clusters. + and "filled", "striped", "wedged", "diagonals" and "rounded" for nodes only. + The styles "filled", "striped" and "rounded" are recognized for clusters. The style "radial" is recognized for nodes, clusters and graphs, and indicates a radial-style gradient fill if applicable. + The style "striped" is recognized for clusters and rectangularly-shaped nodes, and causes the + fill to be done as a set of vertical stripes. The colors are specified via a colorList, + the colors drawn from left to right in list order. Optional color weights can be specified to indicate the + proportional widths of the bars. If the sum of the weights is less than 1, the remainder is divided evenly + among the colors with no weight. + The style "wedged" is recognized for elliptically-shaped nodes, and causes the + fill to be done as a set of wedges. The colors are specified via a colorList, + with the colors drawn counter-clockwise starting at angle 0. Optional color weights are interpreted + analogously to the striped case described above. +

+ The following tables illustrate some of the effects of the style settings. + Examples of tapered line styles are given below. + Examples of linear and radial gradient fill can be seen under colorList. +

+ + + + +
soliddasheddottedboldroundeddiagonalsfilledstripedwedged
Basic style settings for nodes
+

+ + + + +
soliddasheddottedbold
Basic style settings for edges
+

+ + + + +
soliddasheddottedboldroundedfilledstriped
Basic style settings for clusters
+

+ The effect of style=tapered depends on the penwidth, + dir, arrowhead and arrowtail attributes. + The edge starts with width penwidth and tapers to width 1, in points. The dir attribute + determines whether the tapering goes from tail to head (dir=forward), from head to + tail (dir=forward), from the middle to both the head and tail (dir=both), or no + tapering at all (dir=none). If the dir is not explicitly set, the default for the + graph type is used (see dir). Arrowheads and arrowtails are also drawn, based on the + value of dir; to avoid this, set arrowhead and/or arrowtail to "none". +

+ The following table illustrates the style=tapered with penwidth=7 and + arrowtail=none. + + + + +
arrowhead \ dirforwardbackbothnone
normal
none
+

Additional styles are available in device-dependent form. Style lists are passed to device drivers, which can use this to generate appropriate output. diff --git a/doc/info/c_bold.png b/doc/info/c_bold.png new file mode 100644 index 000000000..4124934e0 Binary files /dev/null and b/doc/info/c_bold.png differ diff --git a/doc/info/c_dashed.png b/doc/info/c_dashed.png new file mode 100644 index 000000000..e561c2581 Binary files /dev/null and b/doc/info/c_dashed.png differ diff --git a/doc/info/c_dotted.png b/doc/info/c_dotted.png new file mode 100644 index 000000000..06162900a Binary files /dev/null and b/doc/info/c_dotted.png differ diff --git a/doc/info/c_filled.png b/doc/info/c_filled.png new file mode 100644 index 000000000..f8b21e9b4 Binary files /dev/null and b/doc/info/c_filled.png differ diff --git a/doc/info/c_rounded.png b/doc/info/c_rounded.png new file mode 100644 index 000000000..e2bde0a5b Binary files /dev/null and b/doc/info/c_rounded.png differ diff --git a/doc/info/c_solid.png b/doc/info/c_solid.png new file mode 100644 index 000000000..87c7cdc68 Binary files /dev/null and b/doc/info/c_solid.png differ diff --git a/doc/info/c_striped.png b/doc/info/c_striped.png new file mode 100644 index 000000000..860deb2e4 Binary files /dev/null and b/doc/info/c_striped.png differ diff --git a/doc/info/e_bold.png b/doc/info/e_bold.png new file mode 100644 index 000000000..036ad9723 Binary files /dev/null and b/doc/info/e_bold.png differ diff --git a/doc/info/e_dashed.png b/doc/info/e_dashed.png new file mode 100644 index 000000000..f11233e70 Binary files /dev/null and b/doc/info/e_dashed.png differ diff --git a/doc/info/e_dotted.png b/doc/info/e_dotted.png new file mode 100644 index 000000000..c467fa809 Binary files /dev/null and b/doc/info/e_dotted.png differ diff --git a/doc/info/e_solid.png b/doc/info/e_solid.png new file mode 100644 index 000000000..ac4461a41 Binary files /dev/null and b/doc/info/e_solid.png differ diff --git a/doc/info/n_bold.png b/doc/info/n_bold.png new file mode 100644 index 000000000..e348de3a5 Binary files /dev/null and b/doc/info/n_bold.png differ diff --git a/doc/info/n_dashed.png b/doc/info/n_dashed.png new file mode 100644 index 000000000..f237858ee Binary files /dev/null and b/doc/info/n_dashed.png differ diff --git a/doc/info/n_diagonals.png b/doc/info/n_diagonals.png new file mode 100644 index 000000000..09380544b Binary files /dev/null and b/doc/info/n_diagonals.png differ diff --git a/doc/info/n_dotted.png b/doc/info/n_dotted.png new file mode 100644 index 000000000..89e7eef1c Binary files /dev/null and b/doc/info/n_dotted.png differ diff --git a/doc/info/n_filled.png b/doc/info/n_filled.png new file mode 100644 index 000000000..69fa5662c Binary files /dev/null and b/doc/info/n_filled.png differ diff --git a/doc/info/n_rounded.png b/doc/info/n_rounded.png new file mode 100644 index 000000000..e29e1e6f6 Binary files /dev/null and b/doc/info/n_rounded.png differ diff --git a/doc/info/n_solid.png b/doc/info/n_solid.png new file mode 100644 index 000000000..e8332ff78 Binary files /dev/null and b/doc/info/n_solid.png differ diff --git a/doc/info/n_striped.png b/doc/info/n_striped.png new file mode 100644 index 000000000..5c9732560 Binary files /dev/null and b/doc/info/n_striped.png differ diff --git a/doc/info/n_wedged.png b/doc/info/n_wedged.png new file mode 100644 index 000000000..a47ab4ccb Binary files /dev/null and b/doc/info/n_wedged.png differ diff --git a/doc/info/none_back.png b/doc/info/none_back.png new file mode 100644 index 000000000..e2998853b Binary files /dev/null and b/doc/info/none_back.png differ diff --git a/doc/info/none_both.png b/doc/info/none_both.png new file mode 100644 index 000000000..893eaa471 Binary files /dev/null and b/doc/info/none_both.png differ diff --git a/doc/info/none_forward.png b/doc/info/none_forward.png new file mode 100644 index 000000000..f3cc88af5 Binary files /dev/null and b/doc/info/none_forward.png differ diff --git a/doc/info/none_none.png b/doc/info/none_none.png new file mode 100644 index 000000000..0dba7feb6 Binary files /dev/null and b/doc/info/none_none.png differ diff --git a/doc/info/normal_back.png b/doc/info/normal_back.png new file mode 100644 index 000000000..e2998853b Binary files /dev/null and b/doc/info/normal_back.png differ diff --git a/doc/info/normal_both.png b/doc/info/normal_both.png new file mode 100644 index 000000000..089ee4691 Binary files /dev/null and b/doc/info/normal_both.png differ diff --git a/doc/info/normal_forward.png b/doc/info/normal_forward.png new file mode 100644 index 000000000..019900f8d Binary files /dev/null and b/doc/info/normal_forward.png differ diff --git a/doc/info/normal_none.png b/doc/info/normal_none.png new file mode 100644 index 000000000..0dba7feb6 Binary files /dev/null and b/doc/info/normal_none.png differ diff --git a/doc/infosrc/Makefile.old b/doc/infosrc/Makefile.old index 231e99c17..2bda2928c 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 and mkshapes.sh +# dot is used in mkarrows.sh, mkshapes.sh, mkstyles.sh, mktapers.sh # ps_to_png.sh and other make rules rely on netpbm tools # and ps2raster, which is part of the GMT library. # @@ -34,7 +34,15 @@ MJPG = sdlshapes.jpg GRADPNG = g_lin0.png g_rad0.png g_lin45.png g_rad45.png g_lin90.png g_rad90.png \ g_lin180.png g_rad180.png g_lin270.png g_rad270.png g_lin360.png g_rad360.png -MPNG = plugins.png sdlshapes.png $(GRADPNG) +STYLEPNG = n_solid.png n_dashed.png n_dotted.png n_bold.png n_filled.png n_rounded.png n_striped.png \ + n_wedged.png n_diagonals.png \ + e_solid.png e_dashed.png e_dotted.png e_bold.png \ + c_solid.png c_dashed.png c_dotted.png c_bold.png c_filled.png c_rounded.png c_striped.png + +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) SGIF = Mcircle.gif Mdiamond.gif Msquare.gif box.gif \ circle.gif diamond.gif doublecircle.gif \ @@ -178,9 +186,15 @@ $(AGIF) : $(A2GIF) : ./mkarrows.sh -s $@ -$(GRADPNG) : +$(GRADPNG) : mkgrads.sh ./mkgrads.sh $@ +$(STYLEPNG) : mkstyles.sh + ./mkstyles.sh $@ + +$(TAPERPNG) : mktapers.sh + ./mktapers.sh $@ + clean : rm -f mklang sdlshapes.ps sdlshapes.ppm html.html @@ -189,7 +203,7 @@ distclean : clean rm -f $(A2GIF) $(AGIF) $(SGIF) $(MJPG) $(MGIF) $(MPNG) shapes (for s in $$(cat shapelist); do rm -f $$s.gif; done) -EXTRA_DIST = $(XGIF) mklang.y mkarrows.sh mkattrs.sh mkshapes.sh \ +EXTRA_DIST = $(XGIF) mklang.y mkarrows.sh mkattrs.sh mkshapes.sh mkstyles.sh mktapers.sh \ mktypes.sh mkarrowtbl.sh mkoutput.sh mkshhtml.sh \ ps_to_jpg.sh ps_to_png.sh arrow_grammar grammar html_grammar \ shapelist attrs.1 colors.1 colors.n \ diff --git a/doc/infosrc/attrs b/doc/infosrc/attrs index 77dd22e65..6ed861977 100644 --- a/doc/infosrc/attrs +++ b/doc/infosrc/attrs @@ -385,6 +385,9 @@ Synonym for headURL. :headlabel:E:lblString:""; Text label to be placed near head of edge. See limitation. +:head_lp:E:point; write +Position of an edge's head label, in points. +The position indicates the center of the label. :headport:E:portPos:center; Indicates where on the head node to attach the head of the edge. In the default case, the edge is aimed towards the center of the node, @@ -1199,6 +1202,9 @@ See limitation. :tailport:E:portPos:center; Indicates where on the tail node to attach the tail of the edge. See limitation. +:tail_lp:E:point; write +Position of an edge's tail label, in points. +The position indicates the center of the label. :tailtarget:E:escString:; map,svg If the edge has a tailURL, this attribute determines which window of the @@ -1290,6 +1296,9 @@ for the label attribute. These labels are added after all nodes and edges have been placed. The labels will be placed so that they do not overlap any node or label. This means it may not be possible to place all of them. To force placing all of them, use the forcelabels attribute. +:xlp:NE:point; write +Position of an exterior label, in points. +The position indicates the center of the label. :z:N:double:0.0:-MAXFLOAT/-1000; Deprecated:Use pos attribute, along with dimen and/or dim diff --git a/doc/infosrc/mklang.y b/doc/infosrc/mklang.y index b9bb33807..e5eebbc6c 100644 --- a/doc/infosrc/mklang.y +++ b/doc/infosrc/mklang.y @@ -185,16 +185,14 @@ skipSpace (char* p) return p; } -#if 0 static char* -strndup (char* p, int sz) +mystrndup (char* p, int sz) { char* s = malloc (sz+1); memcpy (s, p, sz); s[sz] = '\0'; return s; } -#endif static char* readLiteral (char* p) @@ -218,7 +216,7 @@ readName (char* p) char* s = p; while (!isspace ((c = *p)) && (c != '\0')) p++; - yylval.str = strndup (s, p-s); + yylval.str = mystrndup (s, p-s); return p; } diff --git a/doc/infosrc/mkstyles.sh b/doc/infosrc/mkstyles.sh new file mode 100755 index 000000000..c08772940 --- /dev/null +++ b/doc/infosrc/mkstyles.sh @@ -0,0 +1,60 @@ +#! /bin/ksh +# +# usage: mkstyles.sh