ink.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  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 <mingle/edge_bundling.h>
  12. #include <vector>
  13. typedef struct {
  14. double x, y;
  15. } point_t;
  16. /* given a list of edges, find the best ink bundling by making them meet at 2 points
  17. \ /
  18. -meet1 ---------- meet2 -
  19. / \
  20. edges: list of edges
  21. numEdges: number of edges
  22. pick: if not NULL, consider edges pick[0], pick[1], ..., pick[numedges-1],
  23. . othetwise consider edges 0, 1, ..., numEdge-1
  24. ink0: ink needed if no bundling
  25. meet1, meet2: meeting point
  26. return: best ink needed if bundled.
  27. */
  28. double ink(const std::vector<pedge> &edges, int numEdges, int *pick,
  29. double *ink0, point_t *meet1, point_t *meet2, double angle_param,
  30. double angle);
  31. double ink1(const pedge &e);
  32. extern double ink_count;