Graphviz 13.1.2~dev.20250730.0050
Loading...
Searching...
No Matches
site.h
Go to the documentation of this file.
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
11#pragma once
12
13#include <stddef.h>
14
15#ifdef __cplusplus
16extern "C" {
17#endif
18
19#include <neatogen/geometry.h>
20
21#if !defined(__CYGWIN__) && defined(__GNUC__) && !defined(__MINGW32__)
22#define INTERNAL __attribute__((visibility("hidden")))
23#else
24#define INTERNAL /* nothing */
25#endif
26
27// sites are also used as vertices on line segments
28typedef struct Site {
30 size_t sitenbr;
31 unsigned refcnt;
33
34extern int siteidx;
35extern Site *bottomsite;
36
37INTERNAL void siteinit(void);
38INTERNAL Site *getsite(void);
39INTERNAL double ngdist(Site *, Site *); /* Distance between two sites */
40INTERNAL void deref(Site *); /* Increment refcnt of site */
41INTERNAL void ref(Site *); /* Decrement refcnt of site */
42INTERNAL void makevertex(Site *); /* Transform a site into a vertex */
43
44#undef INTERNAL
45
46#ifdef __cplusplus
47}
48#endif
#define INTERNAL
Definition site.h:24
INTERNAL void deref(Site *)
Definition site.c:52
int siteidx
Definition site.c:16
INTERNAL Site * getsite(void)
Definition site.c:29
Site * bottomsite
Definition site.c:17
INTERNAL void makevertex(Site *)
Definition site.c:46
INTERNAL double ngdist(Site *, Site *)
Definition site.c:34
INTERNAL void siteinit(void)
Definition site.c:22
INTERNAL void ref(Site *)
Definition site.c:59
Definition site.h:28
Point coord
Definition site.h:29
size_t sitenbr
Definition site.h:30
unsigned refcnt
Definition site.h:31