X7ROOT File Manager
Current Path:
/usr/share/graphviz/gvpr
usr
/
share
/
graphviz
/
gvpr
/
📁
..
📄
addedges
(291 B)
📄
addranks
(830 B)
📄
addrings
(1.29 KB)
📄
anon
(422 B)
📄
attr
(151 B)
📄
bb
(997 B)
📄
bbox
(532 B)
📄
binduce
(1.14 KB)
📄
bipart
(455 B)
📄
chkclusters
(532 B)
📄
chkedges
(916 B)
📄
cliptree
(178 B)
📄
col
(601 B)
📄
collapse
(469 B)
📄
color
(1.41 KB)
📄
cycle
(560 B)
📄
dechain
(264 B)
📄
deghist
(351 B)
📄
deledges
(116 B)
📄
delmulti
(397 B)
📄
delnodes
(249 B)
📄
depath
(547 B)
📄
dijkstra
(647 B)
📄
flatten
(88 B)
📄
get-layers-list
(277 B)
📄
group
(791 B)
📄
histogram
(319 B)
📄
indent
(378 B)
📄
knbhd
(1.2 KB)
📄
maxdeg
(307 B)
📄
path
(449 B)
📄
rotate
(1.17 KB)
📄
scale
(1.12 KB)
📄
scalexy
(1.1 KB)
📄
span
(139 B)
📄
topon
(429 B)
📄
treetoclust
(988 B)
Editing: rotate
/* 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); }
Upload File
Create Folder