circle.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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. #pragma once
  11. #include "render.h"
  12. #ifdef __cplusplus
  13. extern "C" {
  14. #endif
  15. typedef struct {
  16. uint64_t nStepsToLeaf;
  17. uint64_t subtreeSize;
  18. uint64_t nChildren;
  19. uint64_t nStepsToCenter;
  20. node_t *parent;
  21. double span;
  22. double theta;
  23. } rdata;
  24. #define RDATA(n) ((rdata*)(ND_alg(n)))
  25. #define SLEAF(n) (RDATA(n)->nStepsToLeaf)
  26. #define STSIZE(n) (RDATA(n)->subtreeSize)
  27. #define NCHILD(n) (RDATA(n)->nChildren)
  28. #define SCENTER(n) (RDATA(n)->nStepsToCenter)
  29. #define SPARENT(n) (RDATA(n)->parent)
  30. #define SPAN(n) (RDATA(n)->span)
  31. #define THETA(n) (RDATA(n)->theta)
  32. extern Agnode_t* circleLayout(Agraph_t * sg, Agnode_t * center);
  33. extern void twopi_layout(Agraph_t * g);
  34. extern void twopi_cleanup(Agraph_t * g);
  35. extern void twopi_init_graph(graph_t * g);
  36. #ifdef __cplusplus
  37. }
  38. #endif