aspect.c 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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. #include <assert.h>
  11. #include <dotgen/dot.h>
  12. #include <stddef.h>
  13. #include <util/alloc.h>
  14. #include <util/bitarray.h>
  15. /*
  16. * Author: Mohammad T. Irfan
  17. * Summer, 2008
  18. */
  19. /* TODO:
  20. * - Support clusters
  21. * - Support disconnected graphs
  22. * - Provide algorithms for aspect ratios < 1
  23. */
  24. #define DEF_PASSES 5
  25. void setAspect(Agraph_t *g) {
  26. double rv;
  27. char *p;
  28. int r, passes = DEF_PASSES;
  29. p = agget (g, "aspect");
  30. if (!p || ((r = sscanf (p, "%lf,%d", &rv, &passes)) <= 0)) {
  31. return;
  32. }
  33. agwarningf("the aspect attribute has been disabled due to implementation flaws - attribute ignored.\n");
  34. }