Graphviz  2.41.20171026.1811
gvlayout_neato_layout.c
Go to the documentation of this file.
1 /* $Id$ $Revision$ */
2 /* vim:set shiftwidth=4 ts=8: */
3 
4 /*************************************************************************
5  * Copyright (c) 2011 AT&T Intellectual Property
6  * All rights reserved. This program and the accompanying materials
7  * are made available under the terms of the Eclipse Public License v1.0
8  * which accompanies this distribution, and is available at
9  * http://www.eclipse.org/legal/epl-v10.html
10  *
11  * Contributors: See CVS logs. Details at http://www.graphviz.org/
12  *************************************************************************/
13 
14 /*
15  * neato layout plugin
16  *
17  */
18 
19 
20 #include "config.h"
21 
22 #include <stdio.h>
23 
24 #include "gvplugin_layout.h"
25 
26 /* FIXME - globals.h is needed for Nop */
27 #include "globals.h"
28 
29 typedef enum { LAYOUT_NEATO,
38  } layout_type;
39 
40 extern void neato_layout(graph_t * g);
41 extern void fdp_layout(graph_t * g);
42 extern void sfdp_layout(graph_t * g);
43 extern void twopi_layout(graph_t * g);
44 extern void circo_layout(graph_t * g);
45 extern void patchwork_layout(graph_t * g);
46 extern void osage_layout(graph_t * g);
47 
48 extern void neato_cleanup(graph_t * g);
49 extern void fdp_cleanup(graph_t * g);
50 extern void sfdp_cleanup(graph_t * g);
51 extern void twopi_cleanup(graph_t * g);
52 extern void circo_cleanup(graph_t * g);
53 extern void patchwork_cleanup(graph_t * g);
54 extern void osage_cleanup(graph_t * g);
55 
56 static void nop1_layout(graph_t * g)
57 {
58  Nop = 1;
59  neato_layout(g);
60  Nop = 0;
61 }
62 
63 static void nop2_layout(graph_t * g)
64 {
65  Nop = 2;
66  neato_layout(g);
67  Nop = 0;
68 }
69 
73 };
74 
76  fdp_layout,
78 };
79 
80 #ifdef SFDP
81 gvlayout_engine_t sfdpgen_engine = {
84 };
85 #endif
86 
90 };
91 
95 };
96 
98  nop1_layout,
100 };
101 
103  nop2_layout,
105 };
106 
110 };
111 
113  osage_layout,
115 };
116 
118  0,
119 };
120 
122  {LAYOUT_NEATO, "neato", 0, &neatogen_engine, &neatogen_features},
123  {LAYOUT_FDP, "fdp", 0, &fdpgen_engine, &neatogen_features},
124 #ifdef SFDP
125  {LAYOUT_SFDP, "sfdp", 0, &sfdpgen_engine, &neatogen_features},
126 #endif
127  {LAYOUT_TWOPI, "twopi", 0, &twopigen_engine, &neatogen_features},
128  {LAYOUT_CIRCO, "circo", 0, &circogen_engine, &neatogen_features},
129  {LAYOUT_PATCHWORK, "patchwork", 0, &patchwork_engine, &neatogen_features},
130  {LAYOUT_CLUSTER, "osage", 0, &osage_engine, &neatogen_features},
131  {LAYOUT_NOP1, "nop", 0, &nop1gen_engine, &neatogen_features},
132  {LAYOUT_NOP1, "nop1", 0, &nop1gen_engine, &neatogen_features},
133  {LAYOUT_NOP1, "nop2", 0, &nop2gen_engine, &neatogen_features},
134  {0, NULL, 0, NULL, NULL}
135 };
void neato_layout(Agraph_t *g)
Definition: neatoinit.c:1407
gvlayout_features_t neatogen_features
gvplugin_installed_t gvlayout_neato_types[]
void osage_cleanup(Agraph_t *g)
Definition: osageinit.c:389
EXTERN int Nop
Definition: globals.h:70
void circo_layout(Agraph_t *g)
Definition: circularinit.c:244
void circo_cleanup(Agraph_t *g)
Definition: circularinit.c:258
void neato_cleanup(graph_t *g)
Definition: neatoinit.c:142
gvlayout_engine_t nop1gen_engine
gvlayout_engine_t circogen_engine
gvlayout_engine_t neatogen_engine
gvlayout_engine_t fdpgen_engine
void fdp_cleanup(Agraph_t *g)
Definition: fdpinit.c:145
void fdp_layout(Agraph_t *g)
Definition: layout.c:1114
gvlayout_engine_t patchwork_engine
void patchwork_layout(Agraph_t *g)
void sfdp_layout(graph_t *g)
Definition: sfdpinit.c:317
#define NULL
Definition: logic.h:39
gvlayout_engine_t osage_engine
void twopi_cleanup(Agraph_t *g)
Definition: twopiinit.c:185
gvlayout_engine_t nop2gen_engine
void osage_layout(Agraph_t *g)
Definition: osageinit.c:354
void sfdp_cleanup(graph_t *g)
Definition: sfdpinit.c:396
void twopi_layout(Agraph_t *g)
Definition: twopiinit.c:75
void patchwork_cleanup(Agraph_t *g)
gvlayout_engine_t twopigen_engine