diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2019-03-08 13:22:14 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2019-03-08 13:22:14 (GMT) |
commit | 856dfb72dec63f566c5525df42a8b292987a14d6 (patch) | |
tree | 9ec45be18f53cec5499d3618cd4a17c2468f670a /src/gtkext/graph/rank.h | |
parent | 18aca544d1e1acf84f6be981fdd94ecabc92bae3 (diff) |
Reordered blocks in graph view to avoid edge crossing.
Diffstat (limited to 'src/gtkext/graph/rank.h')
-rw-r--r-- | src/gtkext/graph/rank.h | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/src/gtkext/graph/rank.h b/src/gtkext/graph/rank.h index 1a149fc..e28b1f0 100644 --- a/src/gtkext/graph/rank.h +++ b/src/gtkext/graph/rank.h @@ -55,6 +55,12 @@ void init_graph_rank(graph_rank_t *, GGraphCluster *); /* Termine la gestion d'un ensemble de blocs de même rang. */ void exit_graph_rank(graph_rank_t *); +/* Visiteur pour blocs */ +typedef void (* graph_rank_cb) (GGraphCluster *); + +/* Parcours l'ensemble des blocs du rang avec un visiteur. */ +void visit_graph_rank(const graph_rank_t *grank, graph_rank_cb); + /* Assigne à un ensemble de blocs un emplacement initial. */ void reset_graph_rank_allocation(const graph_rank_t *); @@ -89,10 +95,16 @@ void _place_graph_rank_clusters(GGraphCluster **, size_t, gint, int); void dispatch_x_graph_rank(const graph_rank_t *); /* Réorganise au besoin les liens entrants un ensemble de blocs. */ -void sort_graph_rank_incoming_links(graph_rank_t *); +bool get_graph_rank_exit_direction(graph_rank_t *, const GGraphCluster *, LeavingLinkDir *); + +/* Calcule les ordonnées extrèmes atteintes via liens sortants. */ +bool compute_graph_rank_min_max_bottom(const graph_rank_t *, gint [2]); -/* Réordonne les blocs sortant d'un ensemble. */ -void reorder_graph_rank_exit_blocks(graph_rank_t *); +/* Réorganise au besoin les blocs selon les liens d'origine. */ +void reorder_graph_rank_clusters(graph_rank_t *, const GGraphCluster *); + +/* Réorganise au besoin les liens entrants un ensemble de blocs. */ +void sort_graph_rank_incoming_links(graph_rank_t *); /* Réordonne les blocs de départ de boucle d'un ensemble. */ void reorder_graph_rank_loop_blocks(graph_rank_t *); |