Debian Codegraph @

lib/twopigen/circle.h

raw
1 /*************************************************************************
2 * Copyright (c) 2011 AT&T Intellectual Property
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * https://www.eclipse.org/legal/epl-v10.html
7 *
8 * Contributors: Details at https://graphviz.org
9 *************************************************************************/
10
11 #pragma once
12
13 #include "render.h"
14
15 #ifdef __cplusplus
16 extern "C" {
17 #endif
18
19 typedef struct {
20 uint64_t nStepsToLeaf;
21 uint64_t subtreeSize;
22 uint64_t nChildren;
23 uint64_t nStepsToCenter;
24 node_t *parent;
25 double span;
26 double theta;
27 } rdata;
28
29 #define RDATA(n) ((rdata*)(ND_alg(n)))
30 #define SLEAF(n) (RDATA(n)->nStepsToLeaf)
31 #define STSIZE(n) (RDATA(n)->subtreeSize)
32 #define NCHILD(n) (RDATA(n)->nChildren)
33 #define SCENTER(n) (RDATA(n)->nStepsToCenter)
34 #define SPARENT(n) (RDATA(n)->parent)
35 #define SPAN(n) (RDATA(n)->span)
36 #define THETA(n) (RDATA(n)->theta)
37
38 extern Agnode_t* circleLayout(Agraph_t * sg, Agnode_t * center);
39 extern void twopi_layout(Agraph_t * g);
40 extern void twopi_cleanup(Agraph_t * g);
41 extern void twopi_init_graph(graph_t * g);
42
43 #ifdef __cplusplus
44 }
45 #endif