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#ifndef CIRCLE_H
15#define CIRCLE_H
16
17#include "render.h"
18
19#ifdef __cplusplus
20extern "C" {
21#endif
22
23 typedef struct {
24 uint64_t nStepsToLeaf;
25 uint64_t subtreeSize;
26 uint64_t nChildren;
27 uint64_t nStepsToCenter;
28 node_t *parent;
29 double span;
30 double theta;
31 } rdata;
32
33#define RDATA(n) ((rdata*)(ND_alg(n)))
34#define SLEAF(n) (RDATA(n)->nStepsToLeaf)
35#define STSIZE(n) (RDATA(n)->subtreeSize)
36#define NCHILD(n) (RDATA(n)->nChildren)
37#define SCENTER(n) (RDATA(n)->nStepsToCenter)
38#define SPARENT(n) (RDATA(n)->parent)
39#define SPAN(n) (RDATA(n)->span)
40#define THETA(n) (RDATA(n)->theta)
41
42 extern Agnode_t* circleLayout(Agraph_t * sg, Agnode_t * center);
43 extern void twopi_layout(Agraph_t * g);
44 extern void twopi_cleanup(Agraph_t * g);
45 extern void twopi_init_graph(graph_t * g);
46
47#ifdef __cplusplus
48}
49#endif
50#endif
51