/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/rotate (1194B)
/* Given node name and angle, rotate a layout using the given * node as origin. */ BEGIN { double x,y; double x0,y0; double x1,y1; double angle, cosa, sina; int cnt, sz; void rotate (double a, double b) { a -= x0; b -= y0; x1 = a*cosa - b*sina; y1 = a*sina + b*cosa; } char* rotateE (char* p) { char* newpos = ""; cnt = sscanf (p, "e,%lf,%lf%n", &x, &y, &sz); if (cnt == 2) { rotate (x,y); newpos = newpos + sprintf ("e%lf,%lf ", x1, y1); p = substr(p, sz); } cnt = sscanf (p, "s,%lf,%lf%n", &x, &y, &sz); if (cnt == 2) { rotate (x,y); newpos = newpos + sprintf ("s%lf,%lf ", x1, y1); p = substr(p, sz); } while (sscanf (p, "%lf,%lf%n", &x, &y, &sz) == 2) { rotate (x,y); newpos = newpos + sprintf ("%lf,%lf ", x1, y1); p = substr(p, sz); } return newpos; } } BEG_G { node_t ctr = node ($, ARGV[0]); sscanf (ARGV[1], "%f", &angle); cosa = cos(angle); sina = sin(angle); sscanf (ctr.pos, "%f,%f", &x0, &y0); $.bb =""; } N { sscanf ($.pos, "%f,%f", &x, &y); rotate (x,y); $.pos = sprintf ("%f,%f", x1, y1); } E { $.pos = rotateE($.pos); }