From 6fdd8f17d01fa79973f2bf69de8a74cea0b9c6a1 Mon Sep 17 00:00:00 2001 From: Mark Hansen Date: Thu, 22 Oct 2020 20:57:29 +1100 Subject: [PATCH] attrs.html: don't special-case double/int/string Instead, add (very basic) type definitions for them. This simplifies the template. --- doc/info/attrs.html | 456 +++++++++++----------------- doc/infosrc/templates/attrs.html.j2 | 6 +- doc/infosrc/types | 6 + 3 files changed, 189 insertions(+), 279 deletions(-) diff --git a/doc/info/attrs.html b/doc/info/attrs.html index 8979b1ebd..747779fef 100644 --- a/doc/info/attrs.html +++ b/doc/info/attrs.html @@ -83,452 +83,351 @@ of the layout programs. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameUsed ByTypeDefaultMinimumNotes
Damping -Gdouble0.990.0neato only
Gdouble0.990.0neato only
K -GCdouble0.30sfdp, fdp only
GCdouble0.30sfdp, fdp only
URL -ENGCescString -<none>svg, postscript, map only
ENGCescString<none>svg, postscript, map only
_background -Gstring<none>
Gstring<none>
area -NCdouble1.0>0patchwork only
NCdouble1.0>0patchwork only
arrowhead -EarrowType -normal
EarrowTypenormal
arrowsize -Edouble1.00.0
Edouble1.00.0
arrowtail -EarrowType -normal
EarrowTypenormal
bb -Grect -write only
Grectwrite only
bgcolor -GCcolor -
colorList -
<none>
GCcolor
colorList
<none>
center -Gbool -false
Gboolfalse
charset -Gstring"UTF-8"
Gstring"UTF-8"
class -ENCGstring""svg only
ENCGstring""svg only
clusterrank -GclusterMode -localdot only
GclusterModelocaldot only
color -ENCcolor -
colorList -
black
ENCcolor
colorList
black
colorscheme -ENCGstring""
ENCGstring""
comment -ENGstring""
ENGstring""
compound -Gbool -falsedot only
Gboolfalsedot only
concentrate -Gbool -false
Gboolfalse
constraint -Ebool -truedot only
Ebooltruedot only
decorate -Ebool -false
Eboolfalse
defaultdist -Gdouble1+(avg. len)*sqrt(|V|)epsilonneato only
Gdouble1+(avg. len)*sqrt(|V|)epsilonneato only
dim -Gint22sfdp, fdp, neato only
Gint22sfdp, fdp, neato only
dimen -Gint22sfdp, fdp, neato only
Gint22sfdp, fdp, neato only
dir -EdirType -forward(directed)
none(undirected)
EdirTypeforward(directed)
none(undirected)
diredgeconstraints -Gstring
bool -
falseneato only
Gstring
bool
falseneato only
distortion -Ndouble0.0-100.0
Ndouble0.0-100.0
dpi -Gdouble96.0
0.0
svg, bitmap output only
Gdouble96.0
0.0
svg, bitmap output only
edgeURL -EescString -""svg, map only
EescString""svg, map only
edgehref -EescString -""svg, map only
EescString""svg, map only
edgetarget -EescString -<none>svg, map only
EescString<none>svg, map only
edgetooltip -EescString -""svg, cmap only
EescString""svg, cmap only
epsilon -Gdouble.0001 * # nodes(mode == KK)
.0001(mode == major)
.01(mode == sgd)
neato only
Gdouble.0001 * # nodes(mode == KK)
.0001(mode == major)
.01(mode == sgd)
neato only
esep -GaddDouble -
addPoint -
+3not dot
GaddDouble
addPoint
+3not dot
fillcolor -NECcolor -
colorList -
lightgrey(nodes)
black(clusters)
NECcolor
colorList
lightgrey(nodes)
black(clusters)
fixedsize -Nbool -
string
false
Nbool
string
false
fontcolor -ENGCcolor -black
ENGCcolorblack
fontname -ENGCstring"Times-Roman"
ENGCstring"Times-Roman"
fontnames -Gstring""svg only
Gstring""svg only
fontpath -Gstringsystem-dependent
Gstringsystem-dependent
fontsize -ENGCdouble14.01.0
ENGCdouble14.01.0
forcelabels -Gbool -true
Gbooltrue
gradientangle -NCGint""
NCGint""
group -Nstring""dot only
Nstring""dot only
headURL -EescString -""svg, map only
EescString""svg, map only
head_lp -Epoint -write only
Epointwrite only
headclip -Ebool -true
Ebooltrue
headhref -EescString -""svg, map only
EescString""svg, map only
headlabel -ElblString -""
ElblString""
headport -EportPos -center
EportPoscenter
headtarget -EescString -<none>svg, map only
EescString<none>svg, map only
headtooltip -EescString -""svg, cmap only
EescString""svg, cmap only
height -Ndouble0.50.02
Ndouble0.50.02
href -GCNEescString -""svg, postscript, map only
GCNEescString""svg, postscript, map only
id -GCNEescString -""svg, postscript, map only
GCNEescString""svg, postscript, map only
image -Nstring""
Nstring""
imagepath -Gstring""
Gstring""
imagepos -Nstring"mc"
Nstring"mc"
imagescale -Nbool -
string
false
Nbool
string
false
inputscale -Gdouble<none>fdp, neato only
Gdouble<none>fdp, neato only
label -ENGClblString -"\&#92;N" (nodes)
"" (otherwise)
ENGClblString"\&#92;N" (nodes)
"" (otherwise)
labelURL -EescString -""svg, map only
EescString""svg, map only
label_scheme -Gint00sfdp only
Gint00sfdp only
labelangle -Edouble-25.0-180.0
Edouble-25.0-180.0
labeldistance -Edouble1.00.0
Edouble1.00.0
labelfloat -Ebool -false
Eboolfalse
labelfontcolor -Ecolor -black
Ecolorblack
labelfontname -Estring"Times-Roman"
Estring"Times-Roman"
labelfontsize -Edouble14.01.0
Edouble14.01.0
labelhref -EescString -""svg, map only
EescString""svg, map only
labeljust -GCstring"c"
GCstring"c"
labelloc -NGCstring"t"(clusters)
"b"(root graphs)
"c"(nodes)
NGCstring"t"(clusters)
"b"(root graphs)
"c"(nodes)
labeltarget -EescString -<none>svg, map only
EescString<none>svg, map only
labeltooltip -EescString -""svg, cmap only
EescString""svg, cmap only
landscape -Gbool -false
Gboolfalse
layer -ENClayerRange -""
ENClayerRange""
layerlistsep -Gstring","
Gstring","
layers -GlayerList -""
GlayerList""
layerselect -GlayerRange -""
GlayerRange""
layersep -Gstring" &#92;t"
Gstring" &#92;t"
layout -Gstring""
Gstring""
len -Edouble1.0(neato)
0.3(fdp)
fdp, neato only
Edouble1.0(neato)
0.3(fdp)
fdp, neato only
levels -GintMAXINT0.0sfdp only
GintMAXINT0.0sfdp only
levelsgap -Gdouble0.0neato only
Gdouble0.0neato only
lhead -Estring""dot only
Estring""dot only
lheight -GCdoublewrite only
GCdoublewrite only
lp -EGCpoint -write only
EGCpointwrite only
ltail -Estring""dot only
Estring""dot only
lwidth -GCdoublewrite only
GCdoublewrite only
margin -NCGdouble
point -
<device-dependent>
NCGdouble
point
<device-dependent>
maxiter -Gint100 * # nodes(mode == KK)
200(mode == major)
30(mode == sgd)
600(fdp)
fdp, neato only
Gint100 * # nodes(mode == KK)
200(mode == major)
30(mode == sgd)
600(fdp)
fdp, neato only
mclimit -Gdouble1.0dot only
Gdouble1.0dot only
mindist -Gdouble1.00.0circo only
Gdouble1.00.0circo only
minlen -Eint10dot only
Eint10dot only
mode -Gstringmajorneato only
Gstringmajorneato only
model -Gstringshortpathneato only
Gstringshortpathneato only
mosek -Gbool -falseneato only
Gboolfalseneato only
newrank -Gbool -falsedot only
Gboolfalsedot only
nodesep -Gdouble0.250.02
Gdouble0.250.02
nojustify -GCNEbool -false
GCNEboolfalse
normalize -Gdouble
bool -
falsenot dot
Gdouble
bool
falsenot dot
notranslate -Gbool -falseneato only
Gboolfalseneato only
nslimit -Gdoubledot only
Gdoubledot only
nslimit1 -Gdoubledot only
Gdoubledot only
ordering -GNstring""dot only
GNstring""dot only
orientation -Ndouble0.0360.0
Ndouble0.0360.0
orientation -Gstring""
Gstring""
outputorder -GoutputMode -breadthfirst
GoutputModebreadthfirst
overlap -Gstring
bool -
truenot dot
Gstring
bool
truenot dot
overlap_scaling -Gdouble-4-1.0e10prism only
Gdouble-4-1.0e10prism only
overlap_shrink -Gbool -trueprism only
Gbooltrueprism only
pack -Gbool -
int
false
Gbool
int
false
packmode -GpackMode -node
GpackModenode
pad -Gdouble
point -
0.0555 (4 points)
Gdouble
point
0.0555 (4 points)
page -Gdouble
point -
Gdouble
point
pagedir -Gpagedir -BL
GpagedirBL
pencolor -Ccolor -black
Ccolorblack
penwidth -CNEdouble1.00.0
CNEdouble1.00.0
peripheries -NCintshape default(nodes)
1(clusters)
0
NCintshape default(nodes)
1(clusters)
0
pin -Nbool -falsefdp, neato only
Nboolfalsefdp, neato only
pos -ENpoint -
splineType -
ENpoint
splineType
quadtree -GquadType -
bool -
normalsfdp only
GquadType
bool
normalsfdp only
quantum -Gdouble0.00.0
Gdouble0.00.0
rank -SrankType -dot only
SrankTypedot only
rankdir -Grankdir -TBdot only
GrankdirTBdot only
ranksep -Gdouble
doubleList -
0.5(dot)
1.0(twopi)
0.02twopi, dot only
Gdouble
doubleList
0.5(dot)
1.0(twopi)
0.02twopi, dot only
ratio -Gdouble
string
Gdouble
string
rects -Nrect -write only
Nrectwrite only
regular -Nbool -false
Nboolfalse
remincross -Gbool -truedot only
Gbooltruedot only
repulsiveforce -Gdouble1.00.0sfdp only
Gdouble1.00.0sfdp only
resolution -Gdouble96.0
0.0
svg, bitmap output only
Gdouble96.0
0.0
svg, bitmap output only
root -GNstring
bool -
<none>(graphs)
false(nodes)
circo, twopi only
GNstring
bool
<none>(graphs)
false(nodes)
circo, twopi only
rotate -Gint0
Gint0
rotation -Gdouble0sfdp only
Gdouble0sfdp only
samehead -Estring""dot only
Estring""dot only
sametail -Estring""dot only
Estring""dot only
samplepoints -Nint8(output)
20(overlap and image maps)
Nint8(output)
20(overlap and image maps)
scale -Gdouble
point -
not dot
Gdouble
point
not dot
searchsize -Gint30dot only
Gint30dot only
sep -GaddDouble -
addPoint -
+4not dot
GaddDouble
addPoint
+4not dot
shape -Nshape -ellipse
Nshapeellipse
shapefile -Nstring""
Nstring""
showboxes -ENGint00dot only
ENGint00dot only
sides -Nint40
Nint40
size -Gdouble
point -
Gdouble
point
skew -Ndouble0.0-100.0
Ndouble0.0-100.0
smoothing -GsmoothType -"none"sfdp only
GsmoothType"none"sfdp only
sortv -GCNint00
GCNint00
splines -Gbool -
string
Gbool
string
start -GstartType -""fdp, neato only
GstartType""fdp, neato only
style -ENCGstyle -""
ENCGstyle""
stylesheet -Gstring""svg only
Gstring""svg only
tailURL -EescString -""svg, map only
EescString""svg, map only
tail_lp -Epoint -write only
Epointwrite only
tailclip -Ebool -true
Ebooltrue
tailhref -EescString -""svg, map only
EescString""svg, map only
taillabel -ElblString -""
ElblString""
tailport -EportPos -center
EportPoscenter
tailtarget -EescString -<none>svg, map only
EescString<none>svg, map only
tailtooltip -EescString -""svg, cmap only
EescString""svg, cmap only
target -ENGCescString -
string
<none>svg, map only
ENGCescString
string
<none>svg, map only
tooltip -NECescString -""svg, cmap only
NECescString""svg, cmap only
truecolor -Gbool -bitmap output only
Gboolbitmap output only
vertices -NpointList -write only
NpointListwrite only
viewport -GviewPort -""
GviewPort""
voro_margin -Gdouble0.050.0not dot
Gdouble0.050.0not dot
weight -Eint
double
10(dot,twopi)
1(neato,fdp)
Eint
double
10(dot,twopi)
1(neato,fdp)
width -Ndouble0.750.01
Ndouble0.750.01
xdotversion -Gstringxdot only
Gstringxdot only
xlabel -ENlblString -""
ENlblString""
xlp -NEpoint -write only
NEpointwrite only
z -Ndouble0.0-MAXFLOAT
-1000
Ndouble0.0-MAXFLOAT
-1000

Attribute Descriptions

@@ -2288,6 +2187,9 @@ For undirected edges T -- H;, one of the nodes, usually the righthand one, is treated as the head for the purpose of interpreting "forward" and "back". +
double +
Double-precision floating point number. +
doubleList
A colon-separated list of doubles: "%f(:%f)*" where each %f is a double. @@ -2318,6 +2220,9 @@ respectively. Obviously, one can use "\\" to get a single backslash. A backslash appearing before any character not listed above is ignored. +
int +
Integer number. +
layerList
list of strings separated by characters from the layersep attribute (by default, colons, @@ -2527,6 +2432,9 @@ Note that input positions, specified by a node's pos attribute, are only used when the style is "random". +
string +
Text; a sequence of characters. +
style
styleItem ( ',' styleItem )*
diff --git a/doc/infosrc/templates/attrs.html.j2 b/doc/infosrc/templates/attrs.html.j2 index 27f237579..9bf54547b 100644 --- a/doc/infosrc/templates/attrs.html.j2 +++ b/doc/infosrc/templates/attrs.html.j2 @@ -89,11 +89,7 @@ of the layout programs. {%- if not loop.first -%}
{%- endif -%} - {%- if kind in ['double', 'int', 'string'] -%} - {{ kind }} - {%- else -%} - {{kind}} - {% endif -%} + {{kind}} {%- endfor -%}
{%- for default in attr.defaults -%} diff --git a/doc/infosrc/types b/doc/infosrc/types index c40cf50e1..e3d143317 100644 --- a/doc/infosrc/types +++ b/doc/infosrc/types @@ -143,6 +143,8 @@ if dirType is "back" or "both"; For undirected edges T -- H;, one of the nodes, usually the righthand one, is treated as the head for the purpose of interpreting "forward" and "back". +:double +Double-precision floating point number. :doubleList A colon-separated list of doubles: "%f(:%f)*" where each %f is a double. @@ -171,6 +173,8 @@ respectively.

Obviously, one can use "\\" to get a single backslash. A backslash appearing before any character not listed above is ignored. +:int +Integer number. :lblString an escString or an HTML label. @@ -472,6 +476,8 @@ If the value is just "random", a time-based seed is chosen. Note that input positions, specified by a node's pos attribute, are only used when the style is "random". +:string +Text; a sequence of characters. :viewPort "%lf,%lf,%lf,%lf,%lf" or "%lf,%lf,%lf,'%s'"

-- 2.40.0