hier.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  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 <topfish/hierarchy.h>
  12. typedef struct {
  13. int num_foci;
  14. int *foci_nodes; /* Nodes in real graph */
  15. double *x_foci; /* Universal coordinates */
  16. double *y_foci;
  17. } focus_t;
  18. typedef struct {
  19. // All 5 must be set
  20. int width; /* viewport width */
  21. int height; /* viewport height */
  22. double distortion; /* default of 1.0 */
  23. } reposition_t;
  24. void positionAllItems(Hierarchy * hp, focus_t * fs,
  25. reposition_t * parms);
  26. Hierarchy *makeHier(int nnodes, int nedges, v_data *, double *,
  27. double *, hierparms_t *);
  28. focus_t *initFocus(int ncnt);