/usr/share/graphviz/gvpr
NameSizeModeActions
addedges2910644editdlrm
addranks8300644editdlrm
addrings13190644editdlrm
anon4220644editdlrm
attr1510644editdlrm
bb9970644editdlrm
bbox5320644editdlrm
binduce11660644editdlrm
bipart4550644editdlrm
chkclusters5320644editdlrm
chkedges9160644editdlrm
cliptree1780644editdlrm
col6010644editdlrm
collapse4690644editdlrm
color14400644editdlrm
cycle5600644editdlrm
dechain2640644editdlrm
deghist3510644editdlrm
deledges1160644editdlrm
delmulti3970644editdlrm
delnodes2490644editdlrm
depath5470644editdlrm
dijkstra6470644editdlrm
flatten880644editdlrm
get-layers-list2770644editdlrm
group7910644editdlrm
histogram3190644editdlrm
indent3780644editdlrm
knbhd12260644editdlrm
maxdeg3070644editdlrm
path4490644editdlrm
rotate11940644editdlrm
scale11470644editdlrm
scalexy11230644editdlrm
span1390644editdlrm
topon4290644editdlrm
treetoclust9880644editdlrm
Edit: /usr/share/graphviz/gvpr/scalexy (1123B)
/* finds root node of graph. * scales the x and y position of all other nodes using, first, * ARGV[0], or $G.scale. * * The expected syntax is "x,y" where at least one of x or y must * be given. If only one is given, the other is taken as 1. */ BEGIN { double scalex, scaley; int r, done; int setScale (char* s) { if ((sscanf (s, ",%f",&scaley))) { scalex = 1; return 1; } else { r = sscanf (s, "%f,%f",&scalex,&scaley); if (r) { if (r == 1) scaley = 1; return 1; } } return 0; } } BEG_G { node_t ctr = node($,aget($,"root")); double cx, cy, x, y, delx; /* get scale argument */ done = 0; if (ARGC == 1) done = setScale (ARGV[0]); if (!done && isAttr($,"G","scale")) done = setScale ($.scale); if (!done) scalex = scaley = 1.0; if ((scalex == 1.0) && (scaley == 1.0)) exit (0); $.bb = ""; sscanf (ctr.pos, "%f,%f", &cx, &cy); } N [$ != ctr] { sscanf ($.pos, "%f,%f", &x, &y); delx = scalex*(x - cx) + cx; dely = scaley*(y - cy) + cy; $.pos = sprintf ("%f,%f", delx, dely); }