diff options
| author | Tim Dwyer <tgdwyer@gmail.com> | 2006-07-12 02:26:13 +0000 |
|---|---|---|
| committer | tgdwyer <tgdwyer@users.sourceforge.net> | 2006-07-12 02:26:13 +0000 |
| commit | 63c7b54ca8a55514dacbd3444f5c2dc6c0661383 (patch) | |
| tree | 711081ddfb2cd04257df046ac4b982fa8b6dfa58 /src/graphlayout | |
| parent | Previously graph layout was done using the Kamada-Kawai layout algorithm (diff) | |
| download | inkscape-63c7b54ca8a55514dacbd3444f5c2dc6c0661383.tar.gz inkscape-63c7b54ca8a55514dacbd3444f5c2dc6c0661383.zip | |
Added layout button and ideal connector length spinbox to connector toolbar
(bzr r1395)
Diffstat (limited to 'src/graphlayout')
| -rw-r--r-- | src/graphlayout/graphlayout.cpp | 4 | ||||
| -rw-r--r-- | src/graphlayout/graphlayout.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/graphlayout/graphlayout.cpp b/src/graphlayout/graphlayout.cpp index 42b867a33..69d26120d 100644 --- a/src/graphlayout/graphlayout.cpp +++ b/src/graphlayout/graphlayout.cpp @@ -59,7 +59,7 @@ void filterConnectors(GSList const *const items, list<SPItem *> &filtered) { * connectors between them, and uses graph layout techniques to find * a nice layout */ -void graphlayout(GSList const *const items) { +void graphlayout(GSList const *const items, double edgeLength) { if(!items) { return; } @@ -124,7 +124,7 @@ void graphlayout(GSList const *const items) { double eweights[E]; fill(eweights,eweights+E,1); - ConstrainedMajorizationLayout alg(rs,es,eweights,width/n); + ConstrainedMajorizationLayout alg(rs,es,eweights,edgeLength); alg.run(); for (list<SPItem *>::iterator it(selected.begin()); diff --git a/src/graphlayout/graphlayout.h b/src/graphlayout/graphlayout.h index 40090ef6b..2e8de2ddd 100644 --- a/src/graphlayout/graphlayout.h +++ b/src/graphlayout/graphlayout.h @@ -13,7 +13,7 @@ #define SEEN_GRAPHLAYOUT_H struct _GSList; -void graphlayout(_GSList const *const items); +void graphlayout(_GSList const *const items, double edgeLength); class SPItem; bool isConnector(SPItem const *const item); #include <list> |
