fixed bug in pdf2pdf
[swftools.git] / lib / gfxpoly / active.h
1 #ifndef __active_h__
2 #define __active_h__
3
4 #include "poly.h"
5
6 typedef struct _actlist
7 {
8     segment_t*list;
9     int size;
10 #ifdef SPLAY
11     segment_t*root;
12 #endif
13 } actlist_t;
14
15 #define actlist_left(a,s) ((s)->left)
16 #define actlist_right(a,s) ((s)?(s)->right:(a)->list)
17
18 actlist_t* actlist_new();
19 void actlist_destroy(actlist_t*a);
20 int actlist_size(actlist_t*a);
21 void actlist_verify(actlist_t*a, int32_t y);
22 void actlist_dump(actlist_t*a, int32_t y);
23 segment_t* actlist_find(actlist_t*a, point_t p1, point_t p2);  // finds segment immediately to the left of p1 (breaking ties w/ p2)
24 void actlist_insert(actlist_t*a, point_t p1, point_t p2, segment_t*s);
25 void actlist_delete(actlist_t*a, segment_t*s);
26 void actlist_swap(actlist_t*a, segment_t*s1, segment_t*s2);
27 segment_t* actlist_leftmost(actlist_t*a);
28 segment_t* actlist_rightmost(actlist_t*a);
29
30 #endif