macros.h 1.0 KB

1234567891011121314151617181920212223242526272829
  1. /// @file
  2. /// @ingroup common_utils
  3. /*************************************************************************
  4. * Copyright (c) 2011 AT&T Intellectual Property
  5. * All rights reserved. This program and the accompanying materials
  6. * are made available under the terms of the Eclipse Public License v1.0
  7. * which accompanies this distribution, and is available at
  8. * https://www.eclipse.org/legal/epl-v10.html
  9. *
  10. * Contributors: Details at https://graphviz.org
  11. *************************************************************************/
  12. #pragma once
  13. #include <stdbool.h>
  14. #define isPinned(n) (ND_pinned(n) == P_PIN)
  15. #define hasPos(n) (ND_pinned(n) > 0)
  16. #define isFixed(n) (ND_pinned(n) > P_SET)
  17. #define CL_EDGE_TAG "cl_edge_info"
  18. #define SET_CLUST_NODE(n) (ND_clustnode(n) = true)
  19. #define IS_CLUST_NODE(n) (ND_clustnode(n))
  20. #define HAS_CLUST_EDGE(g) (aggetrec(g, CL_EDGE_TAG, 0))
  21. #define EDGE_TYPE(g) (GD_flags(g) & (7 << 1))
  22. #define XPAD(d) ((d).x += 4*GAP)
  23. #define YPAD(d) ((d).y += 2*GAP)
  24. #define PAD(d) {XPAD(d); YPAD(d);}