Graphviz  2.29.20120523.0446
lib/twopigen/circle.h
Go to the documentation of this file.
00001 /* $Id$ $Revision$ */
00002 /* vim:set shiftwidth=4 ts=8: */
00003 
00004 /*************************************************************************
00005  * Copyright (c) 2011 AT&T Intellectual Property 
00006  * All rights reserved. This program and the accompanying materials
00007  * are made available under the terms of the Eclipse Public License v1.0
00008  * which accompanies this distribution, and is available at
00009  * http://www.eclipse.org/legal/epl-v10.html
00010  *
00011  * Contributors: See CVS logs. Details at http://www.graphviz.org/
00012  *************************************************************************/
00013 
00014 #ifndef CIRCLE_H
00015 #define CIRCLE_H
00016 
00017 #include "render.h"
00018 
00019 #ifdef __cplusplus
00020 extern "C" {
00021 #endif
00022 
00023     typedef struct {
00024         unsigned long nStepsToLeaf;
00025         unsigned long subtreeSize;
00026         unsigned long nChildren;
00027         unsigned long nStepsToCenter;
00028         node_t *parent;
00029         double span;
00030         double theta;
00031     } rdata;
00032 
00033 #define RDATA(n) ((rdata*)(ND_alg(n)))
00034 #define SLEAF(n) (RDATA(n)->nStepsToLeaf)
00035 #define STSIZE(n) (RDATA(n)->subtreeSize)
00036 #define NCHILD(n) (RDATA(n)->nChildren)
00037 #define SCENTER(n) (RDATA(n)->nStepsToCenter)
00038 #define SPARENT(n) (RDATA(n)->parent)
00039 #define SPAN(n) (RDATA(n)->span)
00040 #define THETA(n) (RDATA(n)->theta)
00041 
00042     extern Agnode_t* circleLayout(Agraph_t * sg, Agnode_t * center);
00043     extern void twopi_layout(Agraph_t * g);
00044     extern void twopi_cleanup(Agraph_t * g);
00045     extern void twopi_init_graph(graph_t * g);
00046 
00047 #ifdef __cplusplus
00048 }
00049 #endif
00050 #endif