From aa186fbf1eec59ebff0888258629da4c492d2b2b Mon Sep 17 00:00:00 2001 From: ellson Date: Fri, 13 Jan 2006 16:36:27 +0000 Subject: [PATCH] Add pseudo layout engines: dot -Knop == neato -n1 dot -Knop1 == neato -n1 dot -Knop2 == neato -n2 These are needed primarily by the script bindings. --- plugin/neato_layout/gvlayout_neato_layout.c | 29 +++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/plugin/neato_layout/gvlayout_neato_layout.c b/plugin/neato_layout/gvlayout_neato_layout.c index b7f73b250..79d68d74f 100644 --- a/plugin/neato_layout/gvlayout_neato_layout.c +++ b/plugin/neato_layout/gvlayout_neato_layout.c @@ -27,6 +27,8 @@ #include #include "types.h" +/* FIXME - globals.h is needed for Nop */ +#include "globals.h" #include "gvplugin_layout.h" @@ -34,6 +36,8 @@ typedef enum { LAYOUT_NEATO, LAYOUT_FDP, LAYOUT_TWOPI, LAYOUT_CIRCO, + LAYOUT_NOP1, + LAYOUT_NOP2, } layout_type; extern void neato_layout(graph_t * g); @@ -46,6 +50,18 @@ extern void fdp_cleanup(graph_t * g); extern void twopi_cleanup(graph_t * g); extern void circo_cleanup(graph_t * g); +static void nop1_layout(graph_t * g) +{ + Nop = 1; + neato_layout(g); +} + +static void nop2_layout(graph_t * g) +{ + Nop = 2; + neato_layout(g); +} + gvlayout_engine_t neatogen_engine = { neato_layout, neato_cleanup, @@ -66,6 +82,16 @@ gvlayout_engine_t circogen_engine = { circo_cleanup, }; +gvlayout_engine_t nop1gen_engine = { + nop1_layout, + neato_cleanup, +}; + +gvlayout_engine_t nop2gen_engine = { + nop2_layout, + neato_cleanup, +}; + gvlayout_features_t neatogen_features = { 0, }; @@ -75,5 +101,8 @@ gvplugin_installed_t gvlayout_neato_types[] = { {LAYOUT_FDP, "fdp", 0, &fdpgen_engine, &neatogen_features}, {LAYOUT_TWOPI, "twopi", 0, &twopigen_engine, &neatogen_features}, {LAYOUT_CIRCO, "circo", 0, &circogen_engine, &neatogen_features}, + {LAYOUT_NOP1, "nop", 0, &nop1gen_engine, &neatogen_features}, + {LAYOUT_NOP1, "nop1", 0, &nop1gen_engine, &neatogen_features}, + {LAYOUT_NOP1, "nop2", 0, &nop2gen_engine, &neatogen_features}, {0, NULL, 0, NULL, NULL} }; -- 2.40.0