Graphviz 14.0.2~dev.20251008.0253
Loading...
Searching...
No Matches
simple.h File Reference
#include <stddef.h>
#include <util/list.h>
Include dependency graph for simple.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  position
 
struct  vertex
 
struct  polygon
 
struct  intersection
 
struct  active_edge
 

Macros

#define SLOPE(p, q)   ( ( ( p.y ) - ( q.y ) ) / ( ( p.x ) - ( q.x ) ) )
 
#define MAX(a, b)   ( ( a ) > ( b ) ? ( a ) : ( b ) )
 
#define after(v)   (((v)==((v)->poly->finish))?((v)->poly->start):((v)+1))
 
#define prior(v)   (((v)==((v)->poly->start))?((v)->poly->finish):((v)-1))
 

Functions

typedef LIST (struct intersection) intersections_t
 
void find_ints (struct vertex vertex_list[], size_t nvertices, intersections_t *ilist)
 
void find_intersection (struct vertex *l, struct vertex *m, intersections_t *ilist)
 detect whether lines l and m intersect
 

Macro Definition Documentation

◆ after

#define after (   v)    (((v)==((v)->poly->finish))?((v)->poly->start):((v)+1))

Definition at line 17 of file simple.h.

◆ MAX

#define MAX (   a,
 
)    ( ( a ) > ( b ) ? ( a ) : ( b ) )

Definition at line 15 of file simple.h.

◆ prior

#define prior (   v)    (((v)==((v)->poly->start))?((v)->poly->finish):((v)-1))

Definition at line 18 of file simple.h.

◆ SLOPE

#define SLOPE (   p,
 
)    ( ( ( p.y ) - ( q.y ) ) / ( ( p.x ) - ( q.x ) ) )

Definition at line 14 of file simple.h.

Function Documentation

◆ find_intersection()

void find_intersection ( struct vertex l,
struct vertex m,
intersections_t *  ilist 
)

Definition at line 155 of file intersect.c.

References intersection::firstv, intpoint(), LIST_APPEND, MAX, online(), vertex::poly, sgnarea(), position::x, intersection::x, position::y, and intersection::y.

Here is the call graph for this function:

◆ find_ints()

void find_ints ( struct vertex  vertex_list[],
size_t  nvertices,
intersections_t *  ilist 
)

Definition at line 20 of file find_ints.c.

References vertex::active, after, find_intersection(), free(), graphviz_exit(), gt(), gv_alloc(), gv_calloc(), LIST, LIST_APPEND, LIST_DTOR_FREE, LIST_FREE, LIST_GET, LIST_REMOVE, LIST_SIZE, active_edge::name, NULL, and prior.

Here is the call graph for this function:

◆ LIST()

typedef LIST ( struct intersection  )