Debian Codegraph @

lib/neatogen/edges.h

raw
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 <stdbool.h>
14 #include <util/api.h>
15 #include <util/arena.h>
16
17 #ifdef __cplusplus
18 extern "C" {
19 #endif
20
21 #include <neatogen/site.h>
22
23 typedef struct Edge {
24 double a, b, c; /* edge on line ax + by = c */
25 Site *ep[2]; /* endpoints (vertices) of edge; initially NULL */
26 Site *reg[2]; /* sites forming edge */
27 } Edge;
28
29 #define le 0
30 #define re 1
31
32 extern double pxmin, pxmax, pymin, pymax; /* clipping window */
33 PRIVATE void endpoint(Edge *, int, Site *, arena_t *);
34 PRIVATE void clip_line(Edge * e);
35 PRIVATE Edge *gvbisect(Site *, Site *, arena_t *);
36
37 #ifdef __cplusplus
38 }
39 #endif